********************************************************************************
** 	TITLE:		gb2015_2019_bes_contact_networks                              ** 	
**  AUTHOR:	    Philippe Mongrain                                             **
**	DATA:       BES2019_W19_Panel_v0.1                                        **
**	DATE:		October 2022 					                              **	
**	VERSION:	Stata 16	                                                  **
********************************************************************************

* Version control

version 16.0

* Open log file

capture log close
log using "gb2015_2019_bes_contact_networks", replace

* Open dataset

use "BES2019_W19_Panel_v0.1.dta", clear


*******************************
** RELABELING CONSTITUENCIES **
*******************************

* Constituency IDs beginning by: 1 = England (E1400), 3 = Wales (W0700), 2 = Scotland (S1400), 4 = Northern Ireland (N0600). Note, however, that Northern Ireland is not included in the survey. Buckingham (10608) in 2015 and 2017 and Chorley in 2019 (10637) = Speaker's constituency.

* Generate variable to identify potential constituency changes between waves

gen same_conW4 = 1 if pconW3 == pconW5 | pconW3 == . & pconW5!=.
replace same_conW4 = 0 if pconW3!=pconW5 & pconW3!=.

gen same_conW18 = 1 if pconW17 == pconW19 | pconW17 == . & pconW19!=.
replace same_conW18 = 0 if pconW17!=pconW19 & pconW17!=.

* Generate variable to identify potential country changes between waves

gen countryW4 = countryW5 if countryW3 == countryW5

gen countryW18 = countryW5 if countryW17 == countryW19

* Replace constituency IDs (wave 4) - Assuming R's wave 4 constituency is the same as R's wave 5 constituency

gen districtW4 = pconW5

replace districtW4 = 10530 if districtW4 == 1
replace districtW4 = 10531 if districtW4 == 2
replace districtW4 = 10532 if districtW4 == 3
replace districtW4 = 10533 if districtW4 == 4
replace districtW4 = 10534 if districtW4 == 5
replace districtW4 = 10535 if districtW4 == 6
replace districtW4 = 10536 if districtW4 == 7
replace districtW4 = 10537 if districtW4 == 8
replace districtW4 = 10538 if districtW4 == 9
replace districtW4 = 10539 if districtW4 == 10
replace districtW4 = 10540 if districtW4 == 11
replace districtW4 = 10541 if districtW4 == 12
replace districtW4 = 10542 if districtW4 == 13
replace districtW4 = 10543 if districtW4 == 14
replace districtW4 = 10544 if districtW4 == 15
replace districtW4 = 10545 if districtW4 == 16
replace districtW4 = 10546 if districtW4 == 17
replace districtW4 = 10547 if districtW4 == 18
replace districtW4 = 10548 if districtW4 == 19
replace districtW4 = 10549 if districtW4 == 20
replace districtW4 = 10550 if districtW4 == 21
replace districtW4 = 10551 if districtW4 == 22
replace districtW4 = 10552 if districtW4 == 23
replace districtW4 = 10553 if districtW4 == 24
replace districtW4 = 10554 if districtW4 == 25
replace districtW4 = 10555 if districtW4 == 26
replace districtW4 = 10556 if districtW4 == 27
replace districtW4 = 10557 if districtW4 == 28
replace districtW4 = 10558 if districtW4 == 29
replace districtW4 = 10559 if districtW4 == 30
replace districtW4 = 10560 if districtW4 == 31
replace districtW4 = 10561 if districtW4 == 32
replace districtW4 = 10562 if districtW4 == 33
replace districtW4 = 10563 if districtW4 == 34
replace districtW4 = 10564 if districtW4 == 35
replace districtW4 = 10565 if districtW4 == 36
replace districtW4 = 10566 if districtW4 == 37
replace districtW4 = 10567 if districtW4 == 38
replace districtW4 = 10568 if districtW4 == 39
replace districtW4 = 10569 if districtW4 == 40
replace districtW4 = 10570 if districtW4 == 41
replace districtW4 = 10571 if districtW4 == 42
replace districtW4 = 10572 if districtW4 == 43
replace districtW4 = 10573 if districtW4 == 44
replace districtW4 = 10574 if districtW4 == 45
replace districtW4 = 10575 if districtW4 == 46
replace districtW4 = 10576 if districtW4 == 47
replace districtW4 = 10577 if districtW4 == 48
replace districtW4 = 10578 if districtW4 == 49
replace districtW4 = 10579 if districtW4 == 50
replace districtW4 = 10580 if districtW4 == 51
replace districtW4 = 10581 if districtW4 == 52
replace districtW4 = 10582 if districtW4 == 53
replace districtW4 = 10583 if districtW4 == 54
replace districtW4 = 10584 if districtW4 == 55
replace districtW4 = 10585 if districtW4 == 56
replace districtW4 = 10586 if districtW4 == 57
replace districtW4 = 10587 if districtW4 == 58
replace districtW4 = 10588 if districtW4 == 59
replace districtW4 = 10589 if districtW4 == 60
replace districtW4 = 10590 if districtW4 == 61
replace districtW4 = 10591 if districtW4 == 62
replace districtW4 = 10592 if districtW4 == 63
replace districtW4 = 10593 if districtW4 == 64
replace districtW4 = 10594 if districtW4 == 65
replace districtW4 = 10595 if districtW4 == 66
replace districtW4 = 10596 if districtW4 == 67
replace districtW4 = 10597 if districtW4 == 68
replace districtW4 = 10598 if districtW4 == 69
replace districtW4 = 10599 if districtW4 == 70
replace districtW4 = 10600 if districtW4 == 71
replace districtW4 = 10601 if districtW4 == 72
replace districtW4 = 10602 if districtW4 == 73
replace districtW4 = 10603 if districtW4 == 74
replace districtW4 = 10604 if districtW4 == 75
replace districtW4 = 10605 if districtW4 == 76
replace districtW4 = 10606 if districtW4 == 77
replace districtW4 = 10607 if districtW4 == 78
replace districtW4 = 10608 if districtW4 == 79
replace districtW4 = 10609 if districtW4 == 80
replace districtW4 = 10610 if districtW4 == 81
replace districtW4 = 10611 if districtW4 == 82
replace districtW4 = 10612 if districtW4 == 83
replace districtW4 = 10613 if districtW4 == 84
replace districtW4 = 10614 if districtW4 == 85
replace districtW4 = 10615 if districtW4 == 86
replace districtW4 = 10616 if districtW4 == 87
replace districtW4 = 10617 if districtW4 == 88
replace districtW4 = 10618 if districtW4 == 89
replace districtW4 = 10619 if districtW4 == 90
replace districtW4 = 10620 if districtW4 == 91
replace districtW4 = 10621 if districtW4 == 92
replace districtW4 = 10622 if districtW4 == 93
replace districtW4 = 10623 if districtW4 == 94
replace districtW4 = 10624 if districtW4 == 95
replace districtW4 = 10625 if districtW4 == 96
replace districtW4 = 10626 if districtW4 == 97
replace districtW4 = 10627 if districtW4 == 98
replace districtW4 = 10628 if districtW4 == 99
replace districtW4 = 10629 if districtW4 == 100
replace districtW4 = 10630 if districtW4 == 101
replace districtW4 = 10631 if districtW4 == 102
replace districtW4 = 10632 if districtW4 == 103
replace districtW4 = 10633 if districtW4 == 104
replace districtW4 = 10634 if districtW4 == 105
replace districtW4 = 10635 if districtW4 == 106
replace districtW4 = 10636 if districtW4 == 107
replace districtW4 = 10637 if districtW4 == 108
replace districtW4 = 10638 if districtW4 == 109
replace districtW4 = 10639 if districtW4 == 110
replace districtW4 = 10640 if districtW4 == 111
replace districtW4 = 10641 if districtW4 == 112
replace districtW4 = 10642 if districtW4 == 113
replace districtW4 = 10643 if districtW4 == 114
replace districtW4 = 10644 if districtW4 == 115
replace districtW4 = 10645 if districtW4 == 116
replace districtW4 = 10646 if districtW4 == 117
replace districtW4 = 10647 if districtW4 == 118
replace districtW4 = 10648 if districtW4 == 119
replace districtW4 = 10649 if districtW4 == 120
replace districtW4 = 10650 if districtW4 == 121
replace districtW4 = 10651 if districtW4 == 122
replace districtW4 = 10652 if districtW4 == 123
replace districtW4 = 10653 if districtW4 == 124
replace districtW4 = 10654 if districtW4 == 125
replace districtW4 = 10655 if districtW4 == 126
replace districtW4 = 10656 if districtW4 == 127
replace districtW4 = 10657 if districtW4 == 128
replace districtW4 = 10658 if districtW4 == 129
replace districtW4 = 10659 if districtW4 == 130
replace districtW4 = 10660 if districtW4 == 131
replace districtW4 = 10661 if districtW4 == 132
replace districtW4 = 10662 if districtW4 == 133
replace districtW4 = 10663 if districtW4 == 134
replace districtW4 = 10664 if districtW4 == 135
replace districtW4 = 10665 if districtW4 == 136
replace districtW4 = 10666 if districtW4 == 137
replace districtW4 = 10667 if districtW4 == 138
replace districtW4 = 10668 if districtW4 == 139
replace districtW4 = 10669 if districtW4 == 140
replace districtW4 = 10670 if districtW4 == 141
replace districtW4 = 10671 if districtW4 == 142
replace districtW4 = 10672 if districtW4 == 143
replace districtW4 = 10673 if districtW4 == 144
replace districtW4 = 10674 if districtW4 == 145
replace districtW4 = 10675 if districtW4 == 146
replace districtW4 = 10676 if districtW4 == 147
replace districtW4 = 10677 if districtW4 == 148
replace districtW4 = 10678 if districtW4 == 149
replace districtW4 = 10679 if districtW4 == 150
replace districtW4 = 10680 if districtW4 == 151
replace districtW4 = 10681 if districtW4 == 152
replace districtW4 = 10682 if districtW4 == 153
replace districtW4 = 10683 if districtW4 == 154
replace districtW4 = 10684 if districtW4 == 155
replace districtW4 = 10685 if districtW4 == 156
replace districtW4 = 10686 if districtW4 == 157
replace districtW4 = 10687 if districtW4 == 158
replace districtW4 = 10688 if districtW4 == 159
replace districtW4 = 10689 if districtW4 == 160
replace districtW4 = 10690 if districtW4 == 161
replace districtW4 = 10691 if districtW4 == 162
replace districtW4 = 10692 if districtW4 == 163
replace districtW4 = 10693 if districtW4 == 164
replace districtW4 = 10694 if districtW4 == 165
replace districtW4 = 10695 if districtW4 == 166
replace districtW4 = 10696 if districtW4 == 167
replace districtW4 = 10697 if districtW4 == 168
replace districtW4 = 10698 if districtW4 == 169
replace districtW4 = 10699 if districtW4 == 170
replace districtW4 = 10700 if districtW4 == 171
replace districtW4 = 10701 if districtW4 == 172
replace districtW4 = 10702 if districtW4 == 173
replace districtW4 = 10703 if districtW4 == 174
replace districtW4 = 10704 if districtW4 == 175
replace districtW4 = 10705 if districtW4 == 176
replace districtW4 = 10706 if districtW4 == 177
replace districtW4 = 10707 if districtW4 == 178
replace districtW4 = 10708 if districtW4 == 179
replace districtW4 = 10709 if districtW4 == 180
replace districtW4 = 10710 if districtW4 == 181
replace districtW4 = 10711 if districtW4 == 182
replace districtW4 = 10712 if districtW4 == 183
replace districtW4 = 10713 if districtW4 == 184
replace districtW4 = 10714 if districtW4 == 185
replace districtW4 = 10715 if districtW4 == 186
replace districtW4 = 10716 if districtW4 == 187
replace districtW4 = 10717 if districtW4 == 188
replace districtW4 = 10718 if districtW4 == 189
replace districtW4 = 10719 if districtW4 == 190
replace districtW4 = 10720 if districtW4 == 191
replace districtW4 = 10721 if districtW4 == 192
replace districtW4 = 10722 if districtW4 == 193
replace districtW4 = 10723 if districtW4 == 194
replace districtW4 = 10724 if districtW4 == 195
replace districtW4 = 10725 if districtW4 == 196
replace districtW4 = 10726 if districtW4 == 197
replace districtW4 = 10727 if districtW4 == 198
replace districtW4 = 10728 if districtW4 == 199
replace districtW4 = 10729 if districtW4 == 200
replace districtW4 = 10730 if districtW4 == 201
replace districtW4 = 10731 if districtW4 == 202
replace districtW4 = 10732 if districtW4 == 203
replace districtW4 = 10733 if districtW4 == 204
replace districtW4 = 10734 if districtW4 == 205
replace districtW4 = 10735 if districtW4 == 206
replace districtW4 = 10736 if districtW4 == 207
replace districtW4 = 10737 if districtW4 == 208
replace districtW4 = 10738 if districtW4 == 209
replace districtW4 = 10739 if districtW4 == 210
replace districtW4 = 10740 if districtW4 == 211
replace districtW4 = 10741 if districtW4 == 212
replace districtW4 = 10742 if districtW4 == 213
replace districtW4 = 10743 if districtW4 == 214
replace districtW4 = 10744 if districtW4 == 215
replace districtW4 = 10745 if districtW4 == 216
replace districtW4 = 10746 if districtW4 == 217
replace districtW4 = 10747 if districtW4 == 218
replace districtW4 = 10748 if districtW4 == 219
replace districtW4 = 10749 if districtW4 == 220
replace districtW4 = 10750 if districtW4 == 221
replace districtW4 = 10751 if districtW4 == 222
replace districtW4 = 10752 if districtW4 == 223
replace districtW4 = 10753 if districtW4 == 224
replace districtW4 = 10754 if districtW4 == 225
replace districtW4 = 10755 if districtW4 == 226
replace districtW4 = 10756 if districtW4 == 227
replace districtW4 = 10757 if districtW4 == 228
replace districtW4 = 10758 if districtW4 == 229
replace districtW4 = 10759 if districtW4 == 230
replace districtW4 = 10760 if districtW4 == 231
replace districtW4 = 10761 if districtW4 == 232
replace districtW4 = 10762 if districtW4 == 233
replace districtW4 = 10763 if districtW4 == 234
replace districtW4 = 10764 if districtW4 == 235
replace districtW4 = 10765 if districtW4 == 236
replace districtW4 = 10766 if districtW4 == 237
replace districtW4 = 10767 if districtW4 == 238
replace districtW4 = 10768 if districtW4 == 239
replace districtW4 = 10769 if districtW4 == 240
replace districtW4 = 10770 if districtW4 == 241
replace districtW4 = 10771 if districtW4 == 242
replace districtW4 = 10772 if districtW4 == 243
replace districtW4 = 10773 if districtW4 == 244
replace districtW4 = 10774 if districtW4 == 245
replace districtW4 = 10775 if districtW4 == 246
replace districtW4 = 10776 if districtW4 == 247
replace districtW4 = 10777 if districtW4 == 248
replace districtW4 = 10778 if districtW4 == 249
replace districtW4 = 10779 if districtW4 == 250
replace districtW4 = 10780 if districtW4 == 251
replace districtW4 = 10781 if districtW4 == 252
replace districtW4 = 10782 if districtW4 == 253
replace districtW4 = 10783 if districtW4 == 254
replace districtW4 = 10784 if districtW4 == 255
replace districtW4 = 10785 if districtW4 == 256
replace districtW4 = 10786 if districtW4 == 257
replace districtW4 = 10787 if districtW4 == 258
replace districtW4 = 10788 if districtW4 == 259
replace districtW4 = 10789 if districtW4 == 260
replace districtW4 = 10790 if districtW4 == 261
replace districtW4 = 10791 if districtW4 == 262
replace districtW4 = 10792 if districtW4 == 263
replace districtW4 = 10793 if districtW4 == 264
replace districtW4 = 10794 if districtW4 == 265
replace districtW4 = 10795 if districtW4 == 266
replace districtW4 = 10796 if districtW4 == 267
replace districtW4 = 10797 if districtW4 == 268
replace districtW4 = 10798 if districtW4 == 269
replace districtW4 = 10799 if districtW4 == 270
replace districtW4 = 10800 if districtW4 == 271
replace districtW4 = 10801 if districtW4 == 272
replace districtW4 = 10802 if districtW4 == 273
replace districtW4 = 10803 if districtW4 == 274
replace districtW4 = 10804 if districtW4 == 275
replace districtW4 = 10805 if districtW4 == 276
replace districtW4 = 10806 if districtW4 == 277
replace districtW4 = 10807 if districtW4 == 278
replace districtW4 = 10808 if districtW4 == 279
replace districtW4 = 10809 if districtW4 == 280
replace districtW4 = 10810 if districtW4 == 281
replace districtW4 = 10811 if districtW4 == 282
replace districtW4 = 10812 if districtW4 == 283
replace districtW4 = 10813 if districtW4 == 284
replace districtW4 = 10814 if districtW4 == 285
replace districtW4 = 10815 if districtW4 == 286
replace districtW4 = 10816 if districtW4 == 287
replace districtW4 = 10817 if districtW4 == 288
replace districtW4 = 10818 if districtW4 == 289
replace districtW4 = 10819 if districtW4 == 290
replace districtW4 = 10820 if districtW4 == 291
replace districtW4 = 10821 if districtW4 == 292
replace districtW4 = 10822 if districtW4 == 293
replace districtW4 = 10823 if districtW4 == 294
replace districtW4 = 10824 if districtW4 == 295
replace districtW4 = 10825 if districtW4 == 296
replace districtW4 = 10826 if districtW4 == 297
replace districtW4 = 10827 if districtW4 == 298
replace districtW4 = 10828 if districtW4 == 299
replace districtW4 = 10829 if districtW4 == 300
replace districtW4 = 10830 if districtW4 == 301
replace districtW4 = 10831 if districtW4 == 302
replace districtW4 = 10832 if districtW4 == 303
replace districtW4 = 10833 if districtW4 == 304
replace districtW4 = 10834 if districtW4 == 305
replace districtW4 = 10835 if districtW4 == 306
replace districtW4 = 10836 if districtW4 == 307
replace districtW4 = 10837 if districtW4 == 308
replace districtW4 = 10838 if districtW4 == 309
replace districtW4 = 10839 if districtW4 == 310
replace districtW4 = 10840 if districtW4 == 311
replace districtW4 = 10841 if districtW4 == 312
replace districtW4 = 10842 if districtW4 == 313
replace districtW4 = 10843 if districtW4 == 314
replace districtW4 = 10844 if districtW4 == 315
replace districtW4 = 10845 if districtW4 == 316
replace districtW4 = 10846 if districtW4 == 317
replace districtW4 = 10847 if districtW4 == 318
replace districtW4 = 10848 if districtW4 == 319
replace districtW4 = 10849 if districtW4 == 320
replace districtW4 = 10850 if districtW4 == 321
replace districtW4 = 10851 if districtW4 == 322
replace districtW4 = 10852 if districtW4 == 323
replace districtW4 = 10853 if districtW4 == 324
replace districtW4 = 10854 if districtW4 == 325
replace districtW4 = 10855 if districtW4 == 326
replace districtW4 = 10856 if districtW4 == 327
replace districtW4 = 10857 if districtW4 == 328
replace districtW4 = 10858 if districtW4 == 329
replace districtW4 = 10859 if districtW4 == 330
replace districtW4 = 10860 if districtW4 == 331
replace districtW4 = 10861 if districtW4 == 332
replace districtW4 = 10862 if districtW4 == 333
replace districtW4 = 10863 if districtW4 == 334
replace districtW4 = 10864 if districtW4 == 335
replace districtW4 = 10865 if districtW4 == 336
replace districtW4 = 10866 if districtW4 == 337
replace districtW4 = 10867 if districtW4 == 338
replace districtW4 = 10868 if districtW4 == 339
replace districtW4 = 10869 if districtW4 == 340
replace districtW4 = 10870 if districtW4 == 341
replace districtW4 = 10871 if districtW4 == 342
replace districtW4 = 10872 if districtW4 == 343
replace districtW4 = 10873 if districtW4 == 344
replace districtW4 = 10874 if districtW4 == 345
replace districtW4 = 10875 if districtW4 == 346
replace districtW4 = 10876 if districtW4 == 347
replace districtW4 = 10877 if districtW4 == 348
replace districtW4 = 10878 if districtW4 == 349
replace districtW4 = 10879 if districtW4 == 350
replace districtW4 = 10880 if districtW4 == 351
replace districtW4 = 10881 if districtW4 == 352
replace districtW4 = 10882 if districtW4 == 353
replace districtW4 = 10883 if districtW4 == 354
replace districtW4 = 10884 if districtW4 == 355
replace districtW4 = 10885 if districtW4 == 356
replace districtW4 = 10886 if districtW4 == 357
replace districtW4 = 10887 if districtW4 == 358
replace districtW4 = 10888 if districtW4 == 359
replace districtW4 = 10889 if districtW4 == 360
replace districtW4 = 10890 if districtW4 == 361
replace districtW4 = 10891 if districtW4 == 362
replace districtW4 = 10892 if districtW4 == 363
replace districtW4 = 10893 if districtW4 == 364
replace districtW4 = 10894 if districtW4 == 365
replace districtW4 = 10895 if districtW4 == 366
replace districtW4 = 10896 if districtW4 == 367
replace districtW4 = 10897 if districtW4 == 368
replace districtW4 = 10898 if districtW4 == 369
replace districtW4 = 10899 if districtW4 == 370
replace districtW4 = 10900 if districtW4 == 371
replace districtW4 = 10901 if districtW4 == 372
replace districtW4 = 10902 if districtW4 == 373
replace districtW4 = 10903 if districtW4 == 374
replace districtW4 = 10904 if districtW4 == 375
replace districtW4 = 10905 if districtW4 == 376
replace districtW4 = 10906 if districtW4 == 377
replace districtW4 = 10907 if districtW4 == 378
replace districtW4 = 10908 if districtW4 == 379
replace districtW4 = 10909 if districtW4 == 380
replace districtW4 = 10910 if districtW4 == 381
replace districtW4 = 10911 if districtW4 == 382
replace districtW4 = 10912 if districtW4 == 383
replace districtW4 = 10913 if districtW4 == 384
replace districtW4 = 10914 if districtW4 == 385
replace districtW4 = 10915 if districtW4 == 386
replace districtW4 = 10916 if districtW4 == 387
replace districtW4 = 10917 if districtW4 == 388
replace districtW4 = 10918 if districtW4 == 389
replace districtW4 = 10919 if districtW4 == 390
replace districtW4 = 10920 if districtW4 == 391
replace districtW4 = 10921 if districtW4 == 392
replace districtW4 = 10922 if districtW4 == 393
replace districtW4 = 10923 if districtW4 == 394
replace districtW4 = 10924 if districtW4 == 395
replace districtW4 = 10925 if districtW4 == 396
replace districtW4 = 10926 if districtW4 == 397
replace districtW4 = 10927 if districtW4 == 398
replace districtW4 = 10928 if districtW4 == 399
replace districtW4 = 10929 if districtW4 == 400
replace districtW4 = 10930 if districtW4 == 401
replace districtW4 = 10931 if districtW4 == 402
replace districtW4 = 10932 if districtW4 == 403
replace districtW4 = 10933 if districtW4 == 404
replace districtW4 = 10934 if districtW4 == 405
replace districtW4 = 10935 if districtW4 == 406
replace districtW4 = 10936 if districtW4 == 407
replace districtW4 = 10937 if districtW4 == 408
replace districtW4 = 10938 if districtW4 == 409
replace districtW4 = 10939 if districtW4 == 410
replace districtW4 = 10940 if districtW4 == 411
replace districtW4 = 10941 if districtW4 == 412
replace districtW4 = 10942 if districtW4 == 413
replace districtW4 = 10943 if districtW4 == 414
replace districtW4 = 10944 if districtW4 == 415
replace districtW4 = 10945 if districtW4 == 416
replace districtW4 = 10946 if districtW4 == 417
replace districtW4 = 10947 if districtW4 == 418
replace districtW4 = 10948 if districtW4 == 419
replace districtW4 = 10949 if districtW4 == 420
replace districtW4 = 10950 if districtW4 == 421
replace districtW4 = 10951 if districtW4 == 422
replace districtW4 = 10952 if districtW4 == 423
replace districtW4 = 10953 if districtW4 == 424
replace districtW4 = 10954 if districtW4 == 425
replace districtW4 = 10955 if districtW4 == 426
replace districtW4 = 10956 if districtW4 == 427
replace districtW4 = 10957 if districtW4 == 428
replace districtW4 = 10958 if districtW4 == 429
replace districtW4 = 10959 if districtW4 == 430
replace districtW4 = 10960 if districtW4 == 431
replace districtW4 = 10961 if districtW4 == 432
replace districtW4 = 10962 if districtW4 == 433
replace districtW4 = 10963 if districtW4 == 434
replace districtW4 = 10964 if districtW4 == 435
replace districtW4 = 10965 if districtW4 == 436
replace districtW4 = 10966 if districtW4 == 437
replace districtW4 = 10967 if districtW4 == 438
replace districtW4 = 10968 if districtW4 == 439
replace districtW4 = 10969 if districtW4 == 440
replace districtW4 = 10970 if districtW4 == 441
replace districtW4 = 10971 if districtW4 == 442
replace districtW4 = 10972 if districtW4 == 443
replace districtW4 = 10973 if districtW4 == 444
replace districtW4 = 10974 if districtW4 == 445
replace districtW4 = 10975 if districtW4 == 446
replace districtW4 = 10976 if districtW4 == 447
replace districtW4 = 10977 if districtW4 == 448
replace districtW4 = 10978 if districtW4 == 449
replace districtW4 = 10979 if districtW4 == 450
replace districtW4 = 10980 if districtW4 == 451
replace districtW4 = 10981 if districtW4 == 452
replace districtW4 = 10982 if districtW4 == 453
replace districtW4 = 10983 if districtW4 == 454
replace districtW4 = 10984 if districtW4 == 455
replace districtW4 = 10985 if districtW4 == 456
replace districtW4 = 10986 if districtW4 == 457
replace districtW4 = 10987 if districtW4 == 458
replace districtW4 = 10988 if districtW4 == 459
replace districtW4 = 10989 if districtW4 == 460
replace districtW4 = 10990 if districtW4 == 461
replace districtW4 = 10991 if districtW4 == 462
replace districtW4 = 10992 if districtW4 == 463
replace districtW4 = 10993 if districtW4 == 464
replace districtW4 = 10994 if districtW4 == 465
replace districtW4 = 10995 if districtW4 == 466
replace districtW4 = 10996 if districtW4 == 467
replace districtW4 = 10997 if districtW4 == 468
replace districtW4 = 10998 if districtW4 == 469
replace districtW4 = 10999 if districtW4 == 470
replace districtW4 = 11000 if districtW4 == 471
replace districtW4 = 11001 if districtW4 == 472
replace districtW4 = 11002 if districtW4 == 473
replace districtW4 = 11003 if districtW4 == 474
replace districtW4 = 11004 if districtW4 == 475
replace districtW4 = 11005 if districtW4 == 476
replace districtW4 = 11006 if districtW4 == 477
replace districtW4 = 11007 if districtW4 == 478
replace districtW4 = 11008 if districtW4 == 479
replace districtW4 = 11009 if districtW4 == 480
replace districtW4 = 11010 if districtW4 == 481
replace districtW4 = 11011 if districtW4 == 482
replace districtW4 = 11012 if districtW4 == 483
replace districtW4 = 11013 if districtW4 == 484
replace districtW4 = 11014 if districtW4 == 485
replace districtW4 = 11015 if districtW4 == 486
replace districtW4 = 11016 if districtW4 == 487
replace districtW4 = 11017 if districtW4 == 488
replace districtW4 = 11018 if districtW4 == 489
replace districtW4 = 11019 if districtW4 == 490
replace districtW4 = 11020 if districtW4 == 491
replace districtW4 = 11021 if districtW4 == 492
replace districtW4 = 11022 if districtW4 == 493
replace districtW4 = 11023 if districtW4 == 494
replace districtW4 = 11024 if districtW4 == 495
replace districtW4 = 11025 if districtW4 == 496
replace districtW4 = 11026 if districtW4 == 497
replace districtW4 = 11027 if districtW4 == 498
replace districtW4 = 11028 if districtW4 == 499
replace districtW4 = 11029 if districtW4 == 500
replace districtW4 = 11030 if districtW4 == 501
replace districtW4 = 11031 if districtW4 == 502
replace districtW4 = 11032 if districtW4 == 503
replace districtW4 = 11033 if districtW4 == 504
replace districtW4 = 11034 if districtW4 == 505
replace districtW4 = 11035 if districtW4 == 506
replace districtW4 = 11036 if districtW4 == 507
replace districtW4 = 11037 if districtW4 == 508
replace districtW4 = 11038 if districtW4 == 509
replace districtW4 = 11039 if districtW4 == 510
replace districtW4 = 11040 if districtW4 == 511
replace districtW4 = 11041 if districtW4 == 512
replace districtW4 = 11042 if districtW4 == 513
replace districtW4 = 11043 if districtW4 == 514
replace districtW4 = 11044 if districtW4 == 515
replace districtW4 = 11045 if districtW4 == 516
replace districtW4 = 11046 if districtW4 == 517
replace districtW4 = 11047 if districtW4 == 518
replace districtW4 = 11048 if districtW4 == 519
replace districtW4 = 11049 if districtW4 == 520
replace districtW4 = 11050 if districtW4 == 521
replace districtW4 = 11051 if districtW4 == 522
replace districtW4 = 11052 if districtW4 == 523
replace districtW4 = 11053 if districtW4 == 524
replace districtW4 = 11054 if districtW4 == 525
replace districtW4 = 11055 if districtW4 == 526
replace districtW4 = 11056 if districtW4 == 527
replace districtW4 = 11057 if districtW4 == 528
replace districtW4 = 11058 if districtW4 == 529
replace districtW4 = 11059 if districtW4 == 530
replace districtW4 = 11060 if districtW4 == 531
replace districtW4 = 11061 if districtW4 == 532
replace districtW4 = 11062 if districtW4 == 533
replace districtW4 = 30041 if districtW4 == 534
replace districtW4 = 30042 if districtW4 == 535
replace districtW4 = 30043 if districtW4 == 536
replace districtW4 = 30044 if districtW4 == 537
replace districtW4 = 30045 if districtW4 == 538
replace districtW4 = 30046 if districtW4 == 539
replace districtW4 = 30047 if districtW4 == 540
replace districtW4 = 30048 if districtW4 == 541
replace districtW4 = 30049 if districtW4 == 542
replace districtW4 = 30050 if districtW4 == 543
replace districtW4 = 30051 if districtW4 == 544
replace districtW4 = 30052 if districtW4 == 545
replace districtW4 = 30053 if districtW4 == 546
replace districtW4 = 30054 if districtW4 == 547
replace districtW4 = 30055 if districtW4 == 548
replace districtW4 = 30056 if districtW4 == 549
replace districtW4 = 30057 if districtW4 == 550
replace districtW4 = 30058 if districtW4 == 551
replace districtW4 = 30059 if districtW4 == 552
replace districtW4 = 30060 if districtW4 == 553
replace districtW4 = 30061 if districtW4 == 554
replace districtW4 = 30062 if districtW4 == 555
replace districtW4 = 30063 if districtW4 == 556
replace districtW4 = 30064 if districtW4 == 557
replace districtW4 = 30065 if districtW4 == 558
replace districtW4 = 30066 if districtW4 == 559
replace districtW4 = 30067 if districtW4 == 560
replace districtW4 = 30068 if districtW4 == 561
replace districtW4 = 30069 if districtW4 == 562
replace districtW4 = 30070 if districtW4 == 563
replace districtW4 = 30071 if districtW4 == 564
replace districtW4 = 30072 if districtW4 == 565
replace districtW4 = 30073 if districtW4 == 566
replace districtW4 = 30074 if districtW4 == 567
replace districtW4 = 30075 if districtW4 == 568
replace districtW4 = 30076 if districtW4 == 569
replace districtW4 = 30077 if districtW4 == 570
replace districtW4 = 30078 if districtW4 == 571
replace districtW4 = 30079 if districtW4 == 572
replace districtW4 = 30080 if districtW4 == 573
replace districtW4 = 20001 if districtW4 == 574
replace districtW4 = 20002 if districtW4 == 575
replace districtW4 = 20003 if districtW4 == 576
replace districtW4 = 20004 if districtW4 == 577
replace districtW4 = 20005 if districtW4 == 578
replace districtW4 = 20006 if districtW4 == 579
replace districtW4 = 20007 if districtW4 == 580
replace districtW4 = 20008 if districtW4 == 581
replace districtW4 = 20009 if districtW4 == 582
replace districtW4 = 20010 if districtW4 == 583
replace districtW4 = 20011 if districtW4 == 584
replace districtW4 = 20012 if districtW4 == 585
replace districtW4 = 20013 if districtW4 == 586
replace districtW4 = 20014 if districtW4 == 587
replace districtW4 = 20015 if districtW4 == 588
replace districtW4 = 20016 if districtW4 == 589
replace districtW4 = 20017 if districtW4 == 590
replace districtW4 = 20018 if districtW4 == 591
replace districtW4 = 20019 if districtW4 == 592
replace districtW4 = 20020 if districtW4 == 593
replace districtW4 = 20021 if districtW4 == 594
replace districtW4 = 20022 if districtW4 == 595
replace districtW4 = 20023 if districtW4 == 596
replace districtW4 = 20024 if districtW4 == 597
replace districtW4 = 20025 if districtW4 == 598
replace districtW4 = 20026 if districtW4 == 599
replace districtW4 = 20028 if districtW4 == 600
replace districtW4 = 20029 if districtW4 == 601
replace districtW4 = 20030 if districtW4 == 602
replace districtW4 = 20031 if districtW4 == 603
replace districtW4 = 20032 if districtW4 == 604
replace districtW4 = 20033 if districtW4 == 605
replace districtW4 = 20034 if districtW4 == 606
replace districtW4 = 20035 if districtW4 == 607
replace districtW4 = 20036 if districtW4 == 608
replace districtW4 = 20037 if districtW4 == 609
replace districtW4 = 20038 if districtW4 == 610
replace districtW4 = 20039 if districtW4 == 611
replace districtW4 = 20040 if districtW4 == 612
replace districtW4 = 20041 if districtW4 == 613
replace districtW4 = 20042 if districtW4 == 614
replace districtW4 = 20043 if districtW4 == 615
replace districtW4 = 20044 if districtW4 == 616
replace districtW4 = 20045 if districtW4 == 617
replace districtW4 = 20046 if districtW4 == 618
replace districtW4 = 20047 if districtW4 == 619
replace districtW4 = 20027 if districtW4 == 620
replace districtW4 = 20048 if districtW4 == 621
replace districtW4 = 20049 if districtW4 == 622
replace districtW4 = 20050 if districtW4 == 623
replace districtW4 = 20051 if districtW4 == 624
replace districtW4 = 20052 if districtW4 == 625
replace districtW4 = 20053 if districtW4 == 626
replace districtW4 = 20054 if districtW4 == 627
replace districtW4 = 20055 if districtW4 == 628
replace districtW4 = 20056 if districtW4 == 629
replace districtW4 = 20057 if districtW4 == 630
replace districtW4 = 20058 if districtW4 == 631
replace districtW4 = 20059 if districtW4 == 632
replace districtW4 = 40001 if districtW4 == 701
replace districtW4 = 40002 if districtW4 == 702
replace districtW4 = 40003 if districtW4 == 703
replace districtW4 = 40004 if districtW4 == 704
replace districtW4 = 40005 if districtW4 == 705
replace districtW4 = 40006 if districtW4 == 706
replace districtW4 = 40007 if districtW4 == 707
replace districtW4 = 40008 if districtW4 == 708
replace districtW4 = 40009 if districtW4 == 709
replace districtW4 = 40010 if districtW4 == 710
replace districtW4 = 40011 if districtW4 == 711
replace districtW4 = 40012 if districtW4 == 712
replace districtW4 = 40013 if districtW4 == 713
replace districtW4 = 40014 if districtW4 == 714
replace districtW4 = 40015 if districtW4 == 715
replace districtW4 = 40016 if districtW4 == 716
replace districtW4 = 40017 if districtW4 == 717
replace districtW4 = 40018 if districtW4 == 718

* Replace constituency IDs (wave 5)

gen districtW5 = pconW5

replace districtW5 = 10530 if districtW5 == 1
replace districtW5 = 10531 if districtW5 == 2
replace districtW5 = 10532 if districtW5 == 3
replace districtW5 = 10533 if districtW5 == 4
replace districtW5 = 10534 if districtW5 == 5
replace districtW5 = 10535 if districtW5 == 6
replace districtW5 = 10536 if districtW5 == 7
replace districtW5 = 10537 if districtW5 == 8
replace districtW5 = 10538 if districtW5 == 9
replace districtW5 = 10539 if districtW5 == 10
replace districtW5 = 10540 if districtW5 == 11
replace districtW5 = 10541 if districtW5 == 12
replace districtW5 = 10542 if districtW5 == 13
replace districtW5 = 10543 if districtW5 == 14
replace districtW5 = 10544 if districtW5 == 15
replace districtW5 = 10545 if districtW5 == 16
replace districtW5 = 10546 if districtW5 == 17
replace districtW5 = 10547 if districtW5 == 18
replace districtW5 = 10548 if districtW5 == 19
replace districtW5 = 10549 if districtW5 == 20
replace districtW5 = 10550 if districtW5 == 21
replace districtW5 = 10551 if districtW5 == 22
replace districtW5 = 10552 if districtW5 == 23
replace districtW5 = 10553 if districtW5 == 24
replace districtW5 = 10554 if districtW5 == 25
replace districtW5 = 10555 if districtW5 == 26
replace districtW5 = 10556 if districtW5 == 27
replace districtW5 = 10557 if districtW5 == 28
replace districtW5 = 10558 if districtW5 == 29
replace districtW5 = 10559 if districtW5 == 30
replace districtW5 = 10560 if districtW5 == 31
replace districtW5 = 10561 if districtW5 == 32
replace districtW5 = 10562 if districtW5 == 33
replace districtW5 = 10563 if districtW5 == 34
replace districtW5 = 10564 if districtW5 == 35
replace districtW5 = 10565 if districtW5 == 36
replace districtW5 = 10566 if districtW5 == 37
replace districtW5 = 10567 if districtW5 == 38
replace districtW5 = 10568 if districtW5 == 39
replace districtW5 = 10569 if districtW5 == 40
replace districtW5 = 10570 if districtW5 == 41
replace districtW5 = 10571 if districtW5 == 42
replace districtW5 = 10572 if districtW5 == 43
replace districtW5 = 10573 if districtW5 == 44
replace districtW5 = 10574 if districtW5 == 45
replace districtW5 = 10575 if districtW5 == 46
replace districtW5 = 10576 if districtW5 == 47
replace districtW5 = 10577 if districtW5 == 48
replace districtW5 = 10578 if districtW5 == 49
replace districtW5 = 10579 if districtW5 == 50
replace districtW5 = 10580 if districtW5 == 51
replace districtW5 = 10581 if districtW5 == 52
replace districtW5 = 10582 if districtW5 == 53
replace districtW5 = 10583 if districtW5 == 54
replace districtW5 = 10584 if districtW5 == 55
replace districtW5 = 10585 if districtW5 == 56
replace districtW5 = 10586 if districtW5 == 57
replace districtW5 = 10587 if districtW5 == 58
replace districtW5 = 10588 if districtW5 == 59
replace districtW5 = 10589 if districtW5 == 60
replace districtW5 = 10590 if districtW5 == 61
replace districtW5 = 10591 if districtW5 == 62
replace districtW5 = 10592 if districtW5 == 63
replace districtW5 = 10593 if districtW5 == 64
replace districtW5 = 10594 if districtW5 == 65
replace districtW5 = 10595 if districtW5 == 66
replace districtW5 = 10596 if districtW5 == 67
replace districtW5 = 10597 if districtW5 == 68
replace districtW5 = 10598 if districtW5 == 69
replace districtW5 = 10599 if districtW5 == 70
replace districtW5 = 10600 if districtW5 == 71
replace districtW5 = 10601 if districtW5 == 72
replace districtW5 = 10602 if districtW5 == 73
replace districtW5 = 10603 if districtW5 == 74
replace districtW5 = 10604 if districtW5 == 75
replace districtW5 = 10605 if districtW5 == 76
replace districtW5 = 10606 if districtW5 == 77
replace districtW5 = 10607 if districtW5 == 78
replace districtW5 = 10608 if districtW5 == 79
replace districtW5 = 10609 if districtW5 == 80
replace districtW5 = 10610 if districtW5 == 81
replace districtW5 = 10611 if districtW5 == 82
replace districtW5 = 10612 if districtW5 == 83
replace districtW5 = 10613 if districtW5 == 84
replace districtW5 = 10614 if districtW5 == 85
replace districtW5 = 10615 if districtW5 == 86
replace districtW5 = 10616 if districtW5 == 87
replace districtW5 = 10617 if districtW5 == 88
replace districtW5 = 10618 if districtW5 == 89
replace districtW5 = 10619 if districtW5 == 90
replace districtW5 = 10620 if districtW5 == 91
replace districtW5 = 10621 if districtW5 == 92
replace districtW5 = 10622 if districtW5 == 93
replace districtW5 = 10623 if districtW5 == 94
replace districtW5 = 10624 if districtW5 == 95
replace districtW5 = 10625 if districtW5 == 96
replace districtW5 = 10626 if districtW5 == 97
replace districtW5 = 10627 if districtW5 == 98
replace districtW5 = 10628 if districtW5 == 99
replace districtW5 = 10629 if districtW5 == 100
replace districtW5 = 10630 if districtW5 == 101
replace districtW5 = 10631 if districtW5 == 102
replace districtW5 = 10632 if districtW5 == 103
replace districtW5 = 10633 if districtW5 == 104
replace districtW5 = 10634 if districtW5 == 105
replace districtW5 = 10635 if districtW5 == 106
replace districtW5 = 10636 if districtW5 == 107
replace districtW5 = 10637 if districtW5 == 108
replace districtW5 = 10638 if districtW5 == 109
replace districtW5 = 10639 if districtW5 == 110
replace districtW5 = 10640 if districtW5 == 111
replace districtW5 = 10641 if districtW5 == 112
replace districtW5 = 10642 if districtW5 == 113
replace districtW5 = 10643 if districtW5 == 114
replace districtW5 = 10644 if districtW5 == 115
replace districtW5 = 10645 if districtW5 == 116
replace districtW5 = 10646 if districtW5 == 117
replace districtW5 = 10647 if districtW5 == 118
replace districtW5 = 10648 if districtW5 == 119
replace districtW5 = 10649 if districtW5 == 120
replace districtW5 = 10650 if districtW5 == 121
replace districtW5 = 10651 if districtW5 == 122
replace districtW5 = 10652 if districtW5 == 123
replace districtW5 = 10653 if districtW5 == 124
replace districtW5 = 10654 if districtW5 == 125
replace districtW5 = 10655 if districtW5 == 126
replace districtW5 = 10656 if districtW5 == 127
replace districtW5 = 10657 if districtW5 == 128
replace districtW5 = 10658 if districtW5 == 129
replace districtW5 = 10659 if districtW5 == 130
replace districtW5 = 10660 if districtW5 == 131
replace districtW5 = 10661 if districtW5 == 132
replace districtW5 = 10662 if districtW5 == 133
replace districtW5 = 10663 if districtW5 == 134
replace districtW5 = 10664 if districtW5 == 135
replace districtW5 = 10665 if districtW5 == 136
replace districtW5 = 10666 if districtW5 == 137
replace districtW5 = 10667 if districtW5 == 138
replace districtW5 = 10668 if districtW5 == 139
replace districtW5 = 10669 if districtW5 == 140
replace districtW5 = 10670 if districtW5 == 141
replace districtW5 = 10671 if districtW5 == 142
replace districtW5 = 10672 if districtW5 == 143
replace districtW5 = 10673 if districtW5 == 144
replace districtW5 = 10674 if districtW5 == 145
replace districtW5 = 10675 if districtW5 == 146
replace districtW5 = 10676 if districtW5 == 147
replace districtW5 = 10677 if districtW5 == 148
replace districtW5 = 10678 if districtW5 == 149
replace districtW5 = 10679 if districtW5 == 150
replace districtW5 = 10680 if districtW5 == 151
replace districtW5 = 10681 if districtW5 == 152
replace districtW5 = 10682 if districtW5 == 153
replace districtW5 = 10683 if districtW5 == 154
replace districtW5 = 10684 if districtW5 == 155
replace districtW5 = 10685 if districtW5 == 156
replace districtW5 = 10686 if districtW5 == 157
replace districtW5 = 10687 if districtW5 == 158
replace districtW5 = 10688 if districtW5 == 159
replace districtW5 = 10689 if districtW5 == 160
replace districtW5 = 10690 if districtW5 == 161
replace districtW5 = 10691 if districtW5 == 162
replace districtW5 = 10692 if districtW5 == 163
replace districtW5 = 10693 if districtW5 == 164
replace districtW5 = 10694 if districtW5 == 165
replace districtW5 = 10695 if districtW5 == 166
replace districtW5 = 10696 if districtW5 == 167
replace districtW5 = 10697 if districtW5 == 168
replace districtW5 = 10698 if districtW5 == 169
replace districtW5 = 10699 if districtW5 == 170
replace districtW5 = 10700 if districtW5 == 171
replace districtW5 = 10701 if districtW5 == 172
replace districtW5 = 10702 if districtW5 == 173
replace districtW5 = 10703 if districtW5 == 174
replace districtW5 = 10704 if districtW5 == 175
replace districtW5 = 10705 if districtW5 == 176
replace districtW5 = 10706 if districtW5 == 177
replace districtW5 = 10707 if districtW5 == 178
replace districtW5 = 10708 if districtW5 == 179
replace districtW5 = 10709 if districtW5 == 180
replace districtW5 = 10710 if districtW5 == 181
replace districtW5 = 10711 if districtW5 == 182
replace districtW5 = 10712 if districtW5 == 183
replace districtW5 = 10713 if districtW5 == 184
replace districtW5 = 10714 if districtW5 == 185
replace districtW5 = 10715 if districtW5 == 186
replace districtW5 = 10716 if districtW5 == 187
replace districtW5 = 10717 if districtW5 == 188
replace districtW5 = 10718 if districtW5 == 189
replace districtW5 = 10719 if districtW5 == 190
replace districtW5 = 10720 if districtW5 == 191
replace districtW5 = 10721 if districtW5 == 192
replace districtW5 = 10722 if districtW5 == 193
replace districtW5 = 10723 if districtW5 == 194
replace districtW5 = 10724 if districtW5 == 195
replace districtW5 = 10725 if districtW5 == 196
replace districtW5 = 10726 if districtW5 == 197
replace districtW5 = 10727 if districtW5 == 198
replace districtW5 = 10728 if districtW5 == 199
replace districtW5 = 10729 if districtW5 == 200
replace districtW5 = 10730 if districtW5 == 201
replace districtW5 = 10731 if districtW5 == 202
replace districtW5 = 10732 if districtW5 == 203
replace districtW5 = 10733 if districtW5 == 204
replace districtW5 = 10734 if districtW5 == 205
replace districtW5 = 10735 if districtW5 == 206
replace districtW5 = 10736 if districtW5 == 207
replace districtW5 = 10737 if districtW5 == 208
replace districtW5 = 10738 if districtW5 == 209
replace districtW5 = 10739 if districtW5 == 210
replace districtW5 = 10740 if districtW5 == 211
replace districtW5 = 10741 if districtW5 == 212
replace districtW5 = 10742 if districtW5 == 213
replace districtW5 = 10743 if districtW5 == 214
replace districtW5 = 10744 if districtW5 == 215
replace districtW5 = 10745 if districtW5 == 216
replace districtW5 = 10746 if districtW5 == 217
replace districtW5 = 10747 if districtW5 == 218
replace districtW5 = 10748 if districtW5 == 219
replace districtW5 = 10749 if districtW5 == 220
replace districtW5 = 10750 if districtW5 == 221
replace districtW5 = 10751 if districtW5 == 222
replace districtW5 = 10752 if districtW5 == 223
replace districtW5 = 10753 if districtW5 == 224
replace districtW5 = 10754 if districtW5 == 225
replace districtW5 = 10755 if districtW5 == 226
replace districtW5 = 10756 if districtW5 == 227
replace districtW5 = 10757 if districtW5 == 228
replace districtW5 = 10758 if districtW5 == 229
replace districtW5 = 10759 if districtW5 == 230
replace districtW5 = 10760 if districtW5 == 231
replace districtW5 = 10761 if districtW5 == 232
replace districtW5 = 10762 if districtW5 == 233
replace districtW5 = 10763 if districtW5 == 234
replace districtW5 = 10764 if districtW5 == 235
replace districtW5 = 10765 if districtW5 == 236
replace districtW5 = 10766 if districtW5 == 237
replace districtW5 = 10767 if districtW5 == 238
replace districtW5 = 10768 if districtW5 == 239
replace districtW5 = 10769 if districtW5 == 240
replace districtW5 = 10770 if districtW5 == 241
replace districtW5 = 10771 if districtW5 == 242
replace districtW5 = 10772 if districtW5 == 243
replace districtW5 = 10773 if districtW5 == 244
replace districtW5 = 10774 if districtW5 == 245
replace districtW5 = 10775 if districtW5 == 246
replace districtW5 = 10776 if districtW5 == 247
replace districtW5 = 10777 if districtW5 == 248
replace districtW5 = 10778 if districtW5 == 249
replace districtW5 = 10779 if districtW5 == 250
replace districtW5 = 10780 if districtW5 == 251
replace districtW5 = 10781 if districtW5 == 252
replace districtW5 = 10782 if districtW5 == 253
replace districtW5 = 10783 if districtW5 == 254
replace districtW5 = 10784 if districtW5 == 255
replace districtW5 = 10785 if districtW5 == 256
replace districtW5 = 10786 if districtW5 == 257
replace districtW5 = 10787 if districtW5 == 258
replace districtW5 = 10788 if districtW5 == 259
replace districtW5 = 10789 if districtW5 == 260
replace districtW5 = 10790 if districtW5 == 261
replace districtW5 = 10791 if districtW5 == 262
replace districtW5 = 10792 if districtW5 == 263
replace districtW5 = 10793 if districtW5 == 264
replace districtW5 = 10794 if districtW5 == 265
replace districtW5 = 10795 if districtW5 == 266
replace districtW5 = 10796 if districtW5 == 267
replace districtW5 = 10797 if districtW5 == 268
replace districtW5 = 10798 if districtW5 == 269
replace districtW5 = 10799 if districtW5 == 270
replace districtW5 = 10800 if districtW5 == 271
replace districtW5 = 10801 if districtW5 == 272
replace districtW5 = 10802 if districtW5 == 273
replace districtW5 = 10803 if districtW5 == 274
replace districtW5 = 10804 if districtW5 == 275
replace districtW5 = 10805 if districtW5 == 276
replace districtW5 = 10806 if districtW5 == 277
replace districtW5 = 10807 if districtW5 == 278
replace districtW5 = 10808 if districtW5 == 279
replace districtW5 = 10809 if districtW5 == 280
replace districtW5 = 10810 if districtW5 == 281
replace districtW5 = 10811 if districtW5 == 282
replace districtW5 = 10812 if districtW5 == 283
replace districtW5 = 10813 if districtW5 == 284
replace districtW5 = 10814 if districtW5 == 285
replace districtW5 = 10815 if districtW5 == 286
replace districtW5 = 10816 if districtW5 == 287
replace districtW5 = 10817 if districtW5 == 288
replace districtW5 = 10818 if districtW5 == 289
replace districtW5 = 10819 if districtW5 == 290
replace districtW5 = 10820 if districtW5 == 291
replace districtW5 = 10821 if districtW5 == 292
replace districtW5 = 10822 if districtW5 == 293
replace districtW5 = 10823 if districtW5 == 294
replace districtW5 = 10824 if districtW5 == 295
replace districtW5 = 10825 if districtW5 == 296
replace districtW5 = 10826 if districtW5 == 297
replace districtW5 = 10827 if districtW5 == 298
replace districtW5 = 10828 if districtW5 == 299
replace districtW5 = 10829 if districtW5 == 300
replace districtW5 = 10830 if districtW5 == 301
replace districtW5 = 10831 if districtW5 == 302
replace districtW5 = 10832 if districtW5 == 303
replace districtW5 = 10833 if districtW5 == 304
replace districtW5 = 10834 if districtW5 == 305
replace districtW5 = 10835 if districtW5 == 306
replace districtW5 = 10836 if districtW5 == 307
replace districtW5 = 10837 if districtW5 == 308
replace districtW5 = 10838 if districtW5 == 309
replace districtW5 = 10839 if districtW5 == 310
replace districtW5 = 10840 if districtW5 == 311
replace districtW5 = 10841 if districtW5 == 312
replace districtW5 = 10842 if districtW5 == 313
replace districtW5 = 10843 if districtW5 == 314
replace districtW5 = 10844 if districtW5 == 315
replace districtW5 = 10845 if districtW5 == 316
replace districtW5 = 10846 if districtW5 == 317
replace districtW5 = 10847 if districtW5 == 318
replace districtW5 = 10848 if districtW5 == 319
replace districtW5 = 10849 if districtW5 == 320
replace districtW5 = 10850 if districtW5 == 321
replace districtW5 = 10851 if districtW5 == 322
replace districtW5 = 10852 if districtW5 == 323
replace districtW5 = 10853 if districtW5 == 324
replace districtW5 = 10854 if districtW5 == 325
replace districtW5 = 10855 if districtW5 == 326
replace districtW5 = 10856 if districtW5 == 327
replace districtW5 = 10857 if districtW5 == 328
replace districtW5 = 10858 if districtW5 == 329
replace districtW5 = 10859 if districtW5 == 330
replace districtW5 = 10860 if districtW5 == 331
replace districtW5 = 10861 if districtW5 == 332
replace districtW5 = 10862 if districtW5 == 333
replace districtW5 = 10863 if districtW5 == 334
replace districtW5 = 10864 if districtW5 == 335
replace districtW5 = 10865 if districtW5 == 336
replace districtW5 = 10866 if districtW5 == 337
replace districtW5 = 10867 if districtW5 == 338
replace districtW5 = 10868 if districtW5 == 339
replace districtW5 = 10869 if districtW5 == 340
replace districtW5 = 10870 if districtW5 == 341
replace districtW5 = 10871 if districtW5 == 342
replace districtW5 = 10872 if districtW5 == 343
replace districtW5 = 10873 if districtW5 == 344
replace districtW5 = 10874 if districtW5 == 345
replace districtW5 = 10875 if districtW5 == 346
replace districtW5 = 10876 if districtW5 == 347
replace districtW5 = 10877 if districtW5 == 348
replace districtW5 = 10878 if districtW5 == 349
replace districtW5 = 10879 if districtW5 == 350
replace districtW5 = 10880 if districtW5 == 351
replace districtW5 = 10881 if districtW5 == 352
replace districtW5 = 10882 if districtW5 == 353
replace districtW5 = 10883 if districtW5 == 354
replace districtW5 = 10884 if districtW5 == 355
replace districtW5 = 10885 if districtW5 == 356
replace districtW5 = 10886 if districtW5 == 357
replace districtW5 = 10887 if districtW5 == 358
replace districtW5 = 10888 if districtW5 == 359
replace districtW5 = 10889 if districtW5 == 360
replace districtW5 = 10890 if districtW5 == 361
replace districtW5 = 10891 if districtW5 == 362
replace districtW5 = 10892 if districtW5 == 363
replace districtW5 = 10893 if districtW5 == 364
replace districtW5 = 10894 if districtW5 == 365
replace districtW5 = 10895 if districtW5 == 366
replace districtW5 = 10896 if districtW5 == 367
replace districtW5 = 10897 if districtW5 == 368
replace districtW5 = 10898 if districtW5 == 369
replace districtW5 = 10899 if districtW5 == 370
replace districtW5 = 10900 if districtW5 == 371
replace districtW5 = 10901 if districtW5 == 372
replace districtW5 = 10902 if districtW5 == 373
replace districtW5 = 10903 if districtW5 == 374
replace districtW5 = 10904 if districtW5 == 375
replace districtW5 = 10905 if districtW5 == 376
replace districtW5 = 10906 if districtW5 == 377
replace districtW5 = 10907 if districtW5 == 378
replace districtW5 = 10908 if districtW5 == 379
replace districtW5 = 10909 if districtW5 == 380
replace districtW5 = 10910 if districtW5 == 381
replace districtW5 = 10911 if districtW5 == 382
replace districtW5 = 10912 if districtW5 == 383
replace districtW5 = 10913 if districtW5 == 384
replace districtW5 = 10914 if districtW5 == 385
replace districtW5 = 10915 if districtW5 == 386
replace districtW5 = 10916 if districtW5 == 387
replace districtW5 = 10917 if districtW5 == 388
replace districtW5 = 10918 if districtW5 == 389
replace districtW5 = 10919 if districtW5 == 390
replace districtW5 = 10920 if districtW5 == 391
replace districtW5 = 10921 if districtW5 == 392
replace districtW5 = 10922 if districtW5 == 393
replace districtW5 = 10923 if districtW5 == 394
replace districtW5 = 10924 if districtW5 == 395
replace districtW5 = 10925 if districtW5 == 396
replace districtW5 = 10926 if districtW5 == 397
replace districtW5 = 10927 if districtW5 == 398
replace districtW5 = 10928 if districtW5 == 399
replace districtW5 = 10929 if districtW5 == 400
replace districtW5 = 10930 if districtW5 == 401
replace districtW5 = 10931 if districtW5 == 402
replace districtW5 = 10932 if districtW5 == 403
replace districtW5 = 10933 if districtW5 == 404
replace districtW5 = 10934 if districtW5 == 405
replace districtW5 = 10935 if districtW5 == 406
replace districtW5 = 10936 if districtW5 == 407
replace districtW5 = 10937 if districtW5 == 408
replace districtW5 = 10938 if districtW5 == 409
replace districtW5 = 10939 if districtW5 == 410
replace districtW5 = 10940 if districtW5 == 411
replace districtW5 = 10941 if districtW5 == 412
replace districtW5 = 10942 if districtW5 == 413
replace districtW5 = 10943 if districtW5 == 414
replace districtW5 = 10944 if districtW5 == 415
replace districtW5 = 10945 if districtW5 == 416
replace districtW5 = 10946 if districtW5 == 417
replace districtW5 = 10947 if districtW5 == 418
replace districtW5 = 10948 if districtW5 == 419
replace districtW5 = 10949 if districtW5 == 420
replace districtW5 = 10950 if districtW5 == 421
replace districtW5 = 10951 if districtW5 == 422
replace districtW5 = 10952 if districtW5 == 423
replace districtW5 = 10953 if districtW5 == 424
replace districtW5 = 10954 if districtW5 == 425
replace districtW5 = 10955 if districtW5 == 426
replace districtW5 = 10956 if districtW5 == 427
replace districtW5 = 10957 if districtW5 == 428
replace districtW5 = 10958 if districtW5 == 429
replace districtW5 = 10959 if districtW5 == 430
replace districtW5 = 10960 if districtW5 == 431
replace districtW5 = 10961 if districtW5 == 432
replace districtW5 = 10962 if districtW5 == 433
replace districtW5 = 10963 if districtW5 == 434
replace districtW5 = 10964 if districtW5 == 435
replace districtW5 = 10965 if districtW5 == 436
replace districtW5 = 10966 if districtW5 == 437
replace districtW5 = 10967 if districtW5 == 438
replace districtW5 = 10968 if districtW5 == 439
replace districtW5 = 10969 if districtW5 == 440
replace districtW5 = 10970 if districtW5 == 441
replace districtW5 = 10971 if districtW5 == 442
replace districtW5 = 10972 if districtW5 == 443
replace districtW5 = 10973 if districtW5 == 444
replace districtW5 = 10974 if districtW5 == 445
replace districtW5 = 10975 if districtW5 == 446
replace districtW5 = 10976 if districtW5 == 447
replace districtW5 = 10977 if districtW5 == 448
replace districtW5 = 10978 if districtW5 == 449
replace districtW5 = 10979 if districtW5 == 450
replace districtW5 = 10980 if districtW5 == 451
replace districtW5 = 10981 if districtW5 == 452
replace districtW5 = 10982 if districtW5 == 453
replace districtW5 = 10983 if districtW5 == 454
replace districtW5 = 10984 if districtW5 == 455
replace districtW5 = 10985 if districtW5 == 456
replace districtW5 = 10986 if districtW5 == 457
replace districtW5 = 10987 if districtW5 == 458
replace districtW5 = 10988 if districtW5 == 459
replace districtW5 = 10989 if districtW5 == 460
replace districtW5 = 10990 if districtW5 == 461
replace districtW5 = 10991 if districtW5 == 462
replace districtW5 = 10992 if districtW5 == 463
replace districtW5 = 10993 if districtW5 == 464
replace districtW5 = 10994 if districtW5 == 465
replace districtW5 = 10995 if districtW5 == 466
replace districtW5 = 10996 if districtW5 == 467
replace districtW5 = 10997 if districtW5 == 468
replace districtW5 = 10998 if districtW5 == 469
replace districtW5 = 10999 if districtW5 == 470
replace districtW5 = 11000 if districtW5 == 471
replace districtW5 = 11001 if districtW5 == 472
replace districtW5 = 11002 if districtW5 == 473
replace districtW5 = 11003 if districtW5 == 474
replace districtW5 = 11004 if districtW5 == 475
replace districtW5 = 11005 if districtW5 == 476
replace districtW5 = 11006 if districtW5 == 477
replace districtW5 = 11007 if districtW5 == 478
replace districtW5 = 11008 if districtW5 == 479
replace districtW5 = 11009 if districtW5 == 480
replace districtW5 = 11010 if districtW5 == 481
replace districtW5 = 11011 if districtW5 == 482
replace districtW5 = 11012 if districtW5 == 483
replace districtW5 = 11013 if districtW5 == 484
replace districtW5 = 11014 if districtW5 == 485
replace districtW5 = 11015 if districtW5 == 486
replace districtW5 = 11016 if districtW5 == 487
replace districtW5 = 11017 if districtW5 == 488
replace districtW5 = 11018 if districtW5 == 489
replace districtW5 = 11019 if districtW5 == 490
replace districtW5 = 11020 if districtW5 == 491
replace districtW5 = 11021 if districtW5 == 492
replace districtW5 = 11022 if districtW5 == 493
replace districtW5 = 11023 if districtW5 == 494
replace districtW5 = 11024 if districtW5 == 495
replace districtW5 = 11025 if districtW5 == 496
replace districtW5 = 11026 if districtW5 == 497
replace districtW5 = 11027 if districtW5 == 498
replace districtW5 = 11028 if districtW5 == 499
replace districtW5 = 11029 if districtW5 == 500
replace districtW5 = 11030 if districtW5 == 501
replace districtW5 = 11031 if districtW5 == 502
replace districtW5 = 11032 if districtW5 == 503
replace districtW5 = 11033 if districtW5 == 504
replace districtW5 = 11034 if districtW5 == 505
replace districtW5 = 11035 if districtW5 == 506
replace districtW5 = 11036 if districtW5 == 507
replace districtW5 = 11037 if districtW5 == 508
replace districtW5 = 11038 if districtW5 == 509
replace districtW5 = 11039 if districtW5 == 510
replace districtW5 = 11040 if districtW5 == 511
replace districtW5 = 11041 if districtW5 == 512
replace districtW5 = 11042 if districtW5 == 513
replace districtW5 = 11043 if districtW5 == 514
replace districtW5 = 11044 if districtW5 == 515
replace districtW5 = 11045 if districtW5 == 516
replace districtW5 = 11046 if districtW5 == 517
replace districtW5 = 11047 if districtW5 == 518
replace districtW5 = 11048 if districtW5 == 519
replace districtW5 = 11049 if districtW5 == 520
replace districtW5 = 11050 if districtW5 == 521
replace districtW5 = 11051 if districtW5 == 522
replace districtW5 = 11052 if districtW5 == 523
replace districtW5 = 11053 if districtW5 == 524
replace districtW5 = 11054 if districtW5 == 525
replace districtW5 = 11055 if districtW5 == 526
replace districtW5 = 11056 if districtW5 == 527
replace districtW5 = 11057 if districtW5 == 528
replace districtW5 = 11058 if districtW5 == 529
replace districtW5 = 11059 if districtW5 == 530
replace districtW5 = 11060 if districtW5 == 531
replace districtW5 = 11061 if districtW5 == 532
replace districtW5 = 11062 if districtW5 == 533
replace districtW5 = 30041 if districtW5 == 534
replace districtW5 = 30042 if districtW5 == 535
replace districtW5 = 30043 if districtW5 == 536
replace districtW5 = 30044 if districtW5 == 537
replace districtW5 = 30045 if districtW5 == 538
replace districtW5 = 30046 if districtW5 == 539
replace districtW5 = 30047 if districtW5 == 540
replace districtW5 = 30048 if districtW5 == 541
replace districtW5 = 30049 if districtW5 == 542
replace districtW5 = 30050 if districtW5 == 543
replace districtW5 = 30051 if districtW5 == 544
replace districtW5 = 30052 if districtW5 == 545
replace districtW5 = 30053 if districtW5 == 546
replace districtW5 = 30054 if districtW5 == 547
replace districtW5 = 30055 if districtW5 == 548
replace districtW5 = 30056 if districtW5 == 549
replace districtW5 = 30057 if districtW5 == 550
replace districtW5 = 30058 if districtW5 == 551
replace districtW5 = 30059 if districtW5 == 552
replace districtW5 = 30060 if districtW5 == 553
replace districtW5 = 30061 if districtW5 == 554
replace districtW5 = 30062 if districtW5 == 555
replace districtW5 = 30063 if districtW5 == 556
replace districtW5 = 30064 if districtW5 == 557
replace districtW5 = 30065 if districtW5 == 558
replace districtW5 = 30066 if districtW5 == 559
replace districtW5 = 30067 if districtW5 == 560
replace districtW5 = 30068 if districtW5 == 561
replace districtW5 = 30069 if districtW5 == 562
replace districtW5 = 30070 if districtW5 == 563
replace districtW5 = 30071 if districtW5 == 564
replace districtW5 = 30072 if districtW5 == 565
replace districtW5 = 30073 if districtW5 == 566
replace districtW5 = 30074 if districtW5 == 567
replace districtW5 = 30075 if districtW5 == 568
replace districtW5 = 30076 if districtW5 == 569
replace districtW5 = 30077 if districtW5 == 570
replace districtW5 = 30078 if districtW5 == 571
replace districtW5 = 30079 if districtW5 == 572
replace districtW5 = 30080 if districtW5 == 573
replace districtW5 = 20001 if districtW5 == 574
replace districtW5 = 20002 if districtW5 == 575
replace districtW5 = 20003 if districtW5 == 576
replace districtW5 = 20004 if districtW5 == 577
replace districtW5 = 20005 if districtW5 == 578
replace districtW5 = 20006 if districtW5 == 579
replace districtW5 = 20007 if districtW5 == 580
replace districtW5 = 20008 if districtW5 == 581
replace districtW5 = 20009 if districtW5 == 582
replace districtW5 = 20010 if districtW5 == 583
replace districtW5 = 20011 if districtW5 == 584
replace districtW5 = 20012 if districtW5 == 585
replace districtW5 = 20013 if districtW5 == 586
replace districtW5 = 20014 if districtW5 == 587
replace districtW5 = 20015 if districtW5 == 588
replace districtW5 = 20016 if districtW5 == 589
replace districtW5 = 20017 if districtW5 == 590
replace districtW5 = 20018 if districtW5 == 591
replace districtW5 = 20019 if districtW5 == 592
replace districtW5 = 20020 if districtW5 == 593
replace districtW5 = 20021 if districtW5 == 594
replace districtW5 = 20022 if districtW5 == 595
replace districtW5 = 20023 if districtW5 == 596
replace districtW5 = 20024 if districtW5 == 597
replace districtW5 = 20025 if districtW5 == 598
replace districtW5 = 20026 if districtW5 == 599
replace districtW5 = 20028 if districtW5 == 600
replace districtW5 = 20029 if districtW5 == 601
replace districtW5 = 20030 if districtW5 == 602
replace districtW5 = 20031 if districtW5 == 603
replace districtW5 = 20032 if districtW5 == 604
replace districtW5 = 20033 if districtW5 == 605
replace districtW5 = 20034 if districtW5 == 606
replace districtW5 = 20035 if districtW5 == 607
replace districtW5 = 20036 if districtW5 == 608
replace districtW5 = 20037 if districtW5 == 609
replace districtW5 = 20038 if districtW5 == 610
replace districtW5 = 20039 if districtW5 == 611
replace districtW5 = 20040 if districtW5 == 612
replace districtW5 = 20041 if districtW5 == 613
replace districtW5 = 20042 if districtW5 == 614
replace districtW5 = 20043 if districtW5 == 615
replace districtW5 = 20044 if districtW5 == 616
replace districtW5 = 20045 if districtW5 == 617
replace districtW5 = 20046 if districtW5 == 618
replace districtW5 = 20047 if districtW5 == 619
replace districtW5 = 20027 if districtW5 == 620
replace districtW5 = 20048 if districtW5 == 621
replace districtW5 = 20049 if districtW5 == 622
replace districtW5 = 20050 if districtW5 == 623
replace districtW5 = 20051 if districtW5 == 624
replace districtW5 = 20052 if districtW5 == 625
replace districtW5 = 20053 if districtW5 == 626
replace districtW5 = 20054 if districtW5 == 627
replace districtW5 = 20055 if districtW5 == 628
replace districtW5 = 20056 if districtW5 == 629
replace districtW5 = 20057 if districtW5 == 630
replace districtW5 = 20058 if districtW5 == 631
replace districtW5 = 20059 if districtW5 == 632
replace districtW5 = 40001 if districtW5 == 701
replace districtW5 = 40002 if districtW5 == 702
replace districtW5 = 40003 if districtW5 == 703
replace districtW5 = 40004 if districtW5 == 704
replace districtW5 = 40005 if districtW5 == 705
replace districtW5 = 40006 if districtW5 == 706
replace districtW5 = 40007 if districtW5 == 707
replace districtW5 = 40008 if districtW5 == 708
replace districtW5 = 40009 if districtW5 == 709
replace districtW5 = 40010 if districtW5 == 710
replace districtW5 = 40011 if districtW5 == 711
replace districtW5 = 40012 if districtW5 == 712
replace districtW5 = 40013 if districtW5 == 713
replace districtW5 = 40014 if districtW5 == 714
replace districtW5 = 40015 if districtW5 == 715
replace districtW5 = 40016 if districtW5 == 716
replace districtW5 = 40017 if districtW5 == 717
replace districtW5 = 40018 if districtW5 == 718

* Replace constituency IDs (wave 11)

gen districtW11 = pconW11

replace districtW11 = 10530 if districtW11 == 1
replace districtW11 = 10531 if districtW11 == 2
replace districtW11 = 10532 if districtW11 == 3
replace districtW11 = 10533 if districtW11 == 4
replace districtW11 = 10534 if districtW11 == 5
replace districtW11 = 10535 if districtW11 == 6
replace districtW11 = 10536 if districtW11 == 7
replace districtW11 = 10537 if districtW11 == 8
replace districtW11 = 10538 if districtW11 == 9
replace districtW11 = 10539 if districtW11 == 10
replace districtW11 = 10540 if districtW11 == 11
replace districtW11 = 10541 if districtW11 == 12
replace districtW11 = 10542 if districtW11 == 13
replace districtW11 = 10543 if districtW11 == 14
replace districtW11 = 10544 if districtW11 == 15
replace districtW11 = 10545 if districtW11 == 16
replace districtW11 = 10546 if districtW11 == 17
replace districtW11 = 10547 if districtW11 == 18
replace districtW11 = 10548 if districtW11 == 19
replace districtW11 = 10549 if districtW11 == 20
replace districtW11 = 10550 if districtW11 == 21
replace districtW11 = 10551 if districtW11 == 22
replace districtW11 = 10552 if districtW11 == 23
replace districtW11 = 10553 if districtW11 == 24
replace districtW11 = 10554 if districtW11 == 25
replace districtW11 = 10555 if districtW11 == 26
replace districtW11 = 10556 if districtW11 == 27
replace districtW11 = 10557 if districtW11 == 28
replace districtW11 = 10558 if districtW11 == 29
replace districtW11 = 10559 if districtW11 == 30
replace districtW11 = 10560 if districtW11 == 31
replace districtW11 = 10561 if districtW11 == 32
replace districtW11 = 10562 if districtW11 == 33
replace districtW11 = 10563 if districtW11 == 34
replace districtW11 = 10564 if districtW11 == 35
replace districtW11 = 10565 if districtW11 == 36
replace districtW11 = 10566 if districtW11 == 37
replace districtW11 = 10567 if districtW11 == 38
replace districtW11 = 10568 if districtW11 == 39
replace districtW11 = 10569 if districtW11 == 40
replace districtW11 = 10570 if districtW11 == 41
replace districtW11 = 10571 if districtW11 == 42
replace districtW11 = 10572 if districtW11 == 43
replace districtW11 = 10573 if districtW11 == 44
replace districtW11 = 10574 if districtW11 == 45
replace districtW11 = 10575 if districtW11 == 46
replace districtW11 = 10576 if districtW11 == 47
replace districtW11 = 10577 if districtW11 == 48
replace districtW11 = 10578 if districtW11 == 49
replace districtW11 = 10579 if districtW11 == 50
replace districtW11 = 10580 if districtW11 == 51
replace districtW11 = 10581 if districtW11 == 52
replace districtW11 = 10582 if districtW11 == 53
replace districtW11 = 10583 if districtW11 == 54
replace districtW11 = 10584 if districtW11 == 55
replace districtW11 = 10585 if districtW11 == 56
replace districtW11 = 10586 if districtW11 == 57
replace districtW11 = 10587 if districtW11 == 58
replace districtW11 = 10588 if districtW11 == 59
replace districtW11 = 10589 if districtW11 == 60
replace districtW11 = 10590 if districtW11 == 61
replace districtW11 = 10591 if districtW11 == 62
replace districtW11 = 10592 if districtW11 == 63
replace districtW11 = 10593 if districtW11 == 64
replace districtW11 = 10594 if districtW11 == 65
replace districtW11 = 10595 if districtW11 == 66
replace districtW11 = 10596 if districtW11 == 67
replace districtW11 = 10597 if districtW11 == 68
replace districtW11 = 10598 if districtW11 == 69
replace districtW11 = 10599 if districtW11 == 70
replace districtW11 = 10600 if districtW11 == 71
replace districtW11 = 10601 if districtW11 == 72
replace districtW11 = 10602 if districtW11 == 73
replace districtW11 = 10603 if districtW11 == 74
replace districtW11 = 10604 if districtW11 == 75
replace districtW11 = 10605 if districtW11 == 76
replace districtW11 = 10606 if districtW11 == 77
replace districtW11 = 10607 if districtW11 == 78
replace districtW11 = 10608 if districtW11 == 79
replace districtW11 = 10609 if districtW11 == 80
replace districtW11 = 10610 if districtW11 == 81
replace districtW11 = 10611 if districtW11 == 82
replace districtW11 = 10612 if districtW11 == 83
replace districtW11 = 10613 if districtW11 == 84
replace districtW11 = 10614 if districtW11 == 85
replace districtW11 = 10615 if districtW11 == 86
replace districtW11 = 10616 if districtW11 == 87
replace districtW11 = 10617 if districtW11 == 88
replace districtW11 = 10618 if districtW11 == 89
replace districtW11 = 10619 if districtW11 == 90
replace districtW11 = 10620 if districtW11 == 91
replace districtW11 = 10621 if districtW11 == 92
replace districtW11 = 10622 if districtW11 == 93
replace districtW11 = 10623 if districtW11 == 94
replace districtW11 = 10624 if districtW11 == 95
replace districtW11 = 10625 if districtW11 == 96
replace districtW11 = 10626 if districtW11 == 97
replace districtW11 = 10627 if districtW11 == 98
replace districtW11 = 10628 if districtW11 == 99
replace districtW11 = 10629 if districtW11 == 100
replace districtW11 = 10630 if districtW11 == 101
replace districtW11 = 10631 if districtW11 == 102
replace districtW11 = 10632 if districtW11 == 103
replace districtW11 = 10633 if districtW11 == 104
replace districtW11 = 10634 if districtW11 == 105
replace districtW11 = 10635 if districtW11 == 106
replace districtW11 = 10636 if districtW11 == 107
replace districtW11 = 10637 if districtW11 == 108
replace districtW11 = 10638 if districtW11 == 109
replace districtW11 = 10639 if districtW11 == 110
replace districtW11 = 10640 if districtW11 == 111
replace districtW11 = 10641 if districtW11 == 112
replace districtW11 = 10642 if districtW11 == 113
replace districtW11 = 10643 if districtW11 == 114
replace districtW11 = 10644 if districtW11 == 115
replace districtW11 = 10645 if districtW11 == 116
replace districtW11 = 10646 if districtW11 == 117
replace districtW11 = 10647 if districtW11 == 118
replace districtW11 = 10648 if districtW11 == 119
replace districtW11 = 10649 if districtW11 == 120
replace districtW11 = 10650 if districtW11 == 121
replace districtW11 = 10651 if districtW11 == 122
replace districtW11 = 10652 if districtW11 == 123
replace districtW11 = 10653 if districtW11 == 124
replace districtW11 = 10654 if districtW11 == 125
replace districtW11 = 10655 if districtW11 == 126
replace districtW11 = 10656 if districtW11 == 127
replace districtW11 = 10657 if districtW11 == 128
replace districtW11 = 10658 if districtW11 == 129
replace districtW11 = 10659 if districtW11 == 130
replace districtW11 = 10660 if districtW11 == 131
replace districtW11 = 10661 if districtW11 == 132
replace districtW11 = 10662 if districtW11 == 133
replace districtW11 = 10663 if districtW11 == 134
replace districtW11 = 10664 if districtW11 == 135
replace districtW11 = 10665 if districtW11 == 136
replace districtW11 = 10666 if districtW11 == 137
replace districtW11 = 10667 if districtW11 == 138
replace districtW11 = 10668 if districtW11 == 139
replace districtW11 = 10669 if districtW11 == 140
replace districtW11 = 10670 if districtW11 == 141
replace districtW11 = 10671 if districtW11 == 142
replace districtW11 = 10672 if districtW11 == 143
replace districtW11 = 10673 if districtW11 == 144
replace districtW11 = 10674 if districtW11 == 145
replace districtW11 = 10675 if districtW11 == 146
replace districtW11 = 10676 if districtW11 == 147
replace districtW11 = 10677 if districtW11 == 148
replace districtW11 = 10678 if districtW11 == 149
replace districtW11 = 10679 if districtW11 == 150
replace districtW11 = 10680 if districtW11 == 151
replace districtW11 = 10681 if districtW11 == 152
replace districtW11 = 10682 if districtW11 == 153
replace districtW11 = 10683 if districtW11 == 154
replace districtW11 = 10684 if districtW11 == 155
replace districtW11 = 10685 if districtW11 == 156
replace districtW11 = 10686 if districtW11 == 157
replace districtW11 = 10687 if districtW11 == 158
replace districtW11 = 10688 if districtW11 == 159
replace districtW11 = 10689 if districtW11 == 160
replace districtW11 = 10690 if districtW11 == 161
replace districtW11 = 10691 if districtW11 == 162
replace districtW11 = 10692 if districtW11 == 163
replace districtW11 = 10693 if districtW11 == 164
replace districtW11 = 10694 if districtW11 == 165
replace districtW11 = 10695 if districtW11 == 166
replace districtW11 = 10696 if districtW11 == 167
replace districtW11 = 10697 if districtW11 == 168
replace districtW11 = 10698 if districtW11 == 169
replace districtW11 = 10699 if districtW11 == 170
replace districtW11 = 10700 if districtW11 == 171
replace districtW11 = 10701 if districtW11 == 172
replace districtW11 = 10702 if districtW11 == 173
replace districtW11 = 10703 if districtW11 == 174
replace districtW11 = 10704 if districtW11 == 175
replace districtW11 = 10705 if districtW11 == 176
replace districtW11 = 10706 if districtW11 == 177
replace districtW11 = 10707 if districtW11 == 178
replace districtW11 = 10708 if districtW11 == 179
replace districtW11 = 10709 if districtW11 == 180
replace districtW11 = 10710 if districtW11 == 181
replace districtW11 = 10711 if districtW11 == 182
replace districtW11 = 10712 if districtW11 == 183
replace districtW11 = 10713 if districtW11 == 184
replace districtW11 = 10714 if districtW11 == 185
replace districtW11 = 10715 if districtW11 == 186
replace districtW11 = 10716 if districtW11 == 187
replace districtW11 = 10717 if districtW11 == 188
replace districtW11 = 10718 if districtW11 == 189
replace districtW11 = 10719 if districtW11 == 190
replace districtW11 = 10720 if districtW11 == 191
replace districtW11 = 10721 if districtW11 == 192
replace districtW11 = 10722 if districtW11 == 193
replace districtW11 = 10723 if districtW11 == 194
replace districtW11 = 10724 if districtW11 == 195
replace districtW11 = 10725 if districtW11 == 196
replace districtW11 = 10726 if districtW11 == 197
replace districtW11 = 10727 if districtW11 == 198
replace districtW11 = 10728 if districtW11 == 199
replace districtW11 = 10729 if districtW11 == 200
replace districtW11 = 10730 if districtW11 == 201
replace districtW11 = 10731 if districtW11 == 202
replace districtW11 = 10732 if districtW11 == 203
replace districtW11 = 10733 if districtW11 == 204
replace districtW11 = 10734 if districtW11 == 205
replace districtW11 = 10735 if districtW11 == 206
replace districtW11 = 10736 if districtW11 == 207
replace districtW11 = 10737 if districtW11 == 208
replace districtW11 = 10738 if districtW11 == 209
replace districtW11 = 10739 if districtW11 == 210
replace districtW11 = 10740 if districtW11 == 211
replace districtW11 = 10741 if districtW11 == 212
replace districtW11 = 10742 if districtW11 == 213
replace districtW11 = 10743 if districtW11 == 214
replace districtW11 = 10744 if districtW11 == 215
replace districtW11 = 10745 if districtW11 == 216
replace districtW11 = 10746 if districtW11 == 217
replace districtW11 = 10747 if districtW11 == 218
replace districtW11 = 10748 if districtW11 == 219
replace districtW11 = 10749 if districtW11 == 220
replace districtW11 = 10750 if districtW11 == 221
replace districtW11 = 10751 if districtW11 == 222
replace districtW11 = 10752 if districtW11 == 223
replace districtW11 = 10753 if districtW11 == 224
replace districtW11 = 10754 if districtW11 == 225
replace districtW11 = 10755 if districtW11 == 226
replace districtW11 = 10756 if districtW11 == 227
replace districtW11 = 10757 if districtW11 == 228
replace districtW11 = 10758 if districtW11 == 229
replace districtW11 = 10759 if districtW11 == 230
replace districtW11 = 10760 if districtW11 == 231
replace districtW11 = 10761 if districtW11 == 232
replace districtW11 = 10762 if districtW11 == 233
replace districtW11 = 10763 if districtW11 == 234
replace districtW11 = 10764 if districtW11 == 235
replace districtW11 = 10765 if districtW11 == 236
replace districtW11 = 10766 if districtW11 == 237
replace districtW11 = 10767 if districtW11 == 238
replace districtW11 = 10768 if districtW11 == 239
replace districtW11 = 10769 if districtW11 == 240
replace districtW11 = 10770 if districtW11 == 241
replace districtW11 = 10771 if districtW11 == 242
replace districtW11 = 10772 if districtW11 == 243
replace districtW11 = 10773 if districtW11 == 244
replace districtW11 = 10774 if districtW11 == 245
replace districtW11 = 10775 if districtW11 == 246
replace districtW11 = 10776 if districtW11 == 247
replace districtW11 = 10777 if districtW11 == 248
replace districtW11 = 10778 if districtW11 == 249
replace districtW11 = 10779 if districtW11 == 250
replace districtW11 = 10780 if districtW11 == 251
replace districtW11 = 10781 if districtW11 == 252
replace districtW11 = 10782 if districtW11 == 253
replace districtW11 = 10783 if districtW11 == 254
replace districtW11 = 10784 if districtW11 == 255
replace districtW11 = 10785 if districtW11 == 256
replace districtW11 = 10786 if districtW11 == 257
replace districtW11 = 10787 if districtW11 == 258
replace districtW11 = 10788 if districtW11 == 259
replace districtW11 = 10789 if districtW11 == 260
replace districtW11 = 10790 if districtW11 == 261
replace districtW11 = 10791 if districtW11 == 262
replace districtW11 = 10792 if districtW11 == 263
replace districtW11 = 10793 if districtW11 == 264
replace districtW11 = 10794 if districtW11 == 265
replace districtW11 = 10795 if districtW11 == 266
replace districtW11 = 10796 if districtW11 == 267
replace districtW11 = 10797 if districtW11 == 268
replace districtW11 = 10798 if districtW11 == 269
replace districtW11 = 10799 if districtW11 == 270
replace districtW11 = 10800 if districtW11 == 271
replace districtW11 = 10801 if districtW11 == 272
replace districtW11 = 10802 if districtW11 == 273
replace districtW11 = 10803 if districtW11 == 274
replace districtW11 = 10804 if districtW11 == 275
replace districtW11 = 10805 if districtW11 == 276
replace districtW11 = 10806 if districtW11 == 277
replace districtW11 = 10807 if districtW11 == 278
replace districtW11 = 10808 if districtW11 == 279
replace districtW11 = 10809 if districtW11 == 280
replace districtW11 = 10810 if districtW11 == 281
replace districtW11 = 10811 if districtW11 == 282
replace districtW11 = 10812 if districtW11 == 283
replace districtW11 = 10813 if districtW11 == 284
replace districtW11 = 10814 if districtW11 == 285
replace districtW11 = 10815 if districtW11 == 286
replace districtW11 = 10816 if districtW11 == 287
replace districtW11 = 10817 if districtW11 == 288
replace districtW11 = 10818 if districtW11 == 289
replace districtW11 = 10819 if districtW11 == 290
replace districtW11 = 10820 if districtW11 == 291
replace districtW11 = 10821 if districtW11 == 292
replace districtW11 = 10822 if districtW11 == 293
replace districtW11 = 10823 if districtW11 == 294
replace districtW11 = 10824 if districtW11 == 295
replace districtW11 = 10825 if districtW11 == 296
replace districtW11 = 10826 if districtW11 == 297
replace districtW11 = 10827 if districtW11 == 298
replace districtW11 = 10828 if districtW11 == 299
replace districtW11 = 10829 if districtW11 == 300
replace districtW11 = 10830 if districtW11 == 301
replace districtW11 = 10831 if districtW11 == 302
replace districtW11 = 10832 if districtW11 == 303
replace districtW11 = 10833 if districtW11 == 304
replace districtW11 = 10834 if districtW11 == 305
replace districtW11 = 10835 if districtW11 == 306
replace districtW11 = 10836 if districtW11 == 307
replace districtW11 = 10837 if districtW11 == 308
replace districtW11 = 10838 if districtW11 == 309
replace districtW11 = 10839 if districtW11 == 310
replace districtW11 = 10840 if districtW11 == 311
replace districtW11 = 10841 if districtW11 == 312
replace districtW11 = 10842 if districtW11 == 313
replace districtW11 = 10843 if districtW11 == 314
replace districtW11 = 10844 if districtW11 == 315
replace districtW11 = 10845 if districtW11 == 316
replace districtW11 = 10846 if districtW11 == 317
replace districtW11 = 10847 if districtW11 == 318
replace districtW11 = 10848 if districtW11 == 319
replace districtW11 = 10849 if districtW11 == 320
replace districtW11 = 10850 if districtW11 == 321
replace districtW11 = 10851 if districtW11 == 322
replace districtW11 = 10852 if districtW11 == 323
replace districtW11 = 10853 if districtW11 == 324
replace districtW11 = 10854 if districtW11 == 325
replace districtW11 = 10855 if districtW11 == 326
replace districtW11 = 10856 if districtW11 == 327
replace districtW11 = 10857 if districtW11 == 328
replace districtW11 = 10858 if districtW11 == 329
replace districtW11 = 10859 if districtW11 == 330
replace districtW11 = 10860 if districtW11 == 331
replace districtW11 = 10861 if districtW11 == 332
replace districtW11 = 10862 if districtW11 == 333
replace districtW11 = 10863 if districtW11 == 334
replace districtW11 = 10864 if districtW11 == 335
replace districtW11 = 10865 if districtW11 == 336
replace districtW11 = 10866 if districtW11 == 337
replace districtW11 = 10867 if districtW11 == 338
replace districtW11 = 10868 if districtW11 == 339
replace districtW11 = 10869 if districtW11 == 340
replace districtW11 = 10870 if districtW11 == 341
replace districtW11 = 10871 if districtW11 == 342
replace districtW11 = 10872 if districtW11 == 343
replace districtW11 = 10873 if districtW11 == 344
replace districtW11 = 10874 if districtW11 == 345
replace districtW11 = 10875 if districtW11 == 346
replace districtW11 = 10876 if districtW11 == 347
replace districtW11 = 10877 if districtW11 == 348
replace districtW11 = 10878 if districtW11 == 349
replace districtW11 = 10879 if districtW11 == 350
replace districtW11 = 10880 if districtW11 == 351
replace districtW11 = 10881 if districtW11 == 352
replace districtW11 = 10882 if districtW11 == 353
replace districtW11 = 10883 if districtW11 == 354
replace districtW11 = 10884 if districtW11 == 355
replace districtW11 = 10885 if districtW11 == 356
replace districtW11 = 10886 if districtW11 == 357
replace districtW11 = 10887 if districtW11 == 358
replace districtW11 = 10888 if districtW11 == 359
replace districtW11 = 10889 if districtW11 == 360
replace districtW11 = 10890 if districtW11 == 361
replace districtW11 = 10891 if districtW11 == 362
replace districtW11 = 10892 if districtW11 == 363
replace districtW11 = 10893 if districtW11 == 364
replace districtW11 = 10894 if districtW11 == 365
replace districtW11 = 10895 if districtW11 == 366
replace districtW11 = 10896 if districtW11 == 367
replace districtW11 = 10897 if districtW11 == 368
replace districtW11 = 10898 if districtW11 == 369
replace districtW11 = 10899 if districtW11 == 370
replace districtW11 = 10900 if districtW11 == 371
replace districtW11 = 10901 if districtW11 == 372
replace districtW11 = 10902 if districtW11 == 373
replace districtW11 = 10903 if districtW11 == 374
replace districtW11 = 10904 if districtW11 == 375
replace districtW11 = 10905 if districtW11 == 376
replace districtW11 = 10906 if districtW11 == 377
replace districtW11 = 10907 if districtW11 == 378
replace districtW11 = 10908 if districtW11 == 379
replace districtW11 = 10909 if districtW11 == 380
replace districtW11 = 10910 if districtW11 == 381
replace districtW11 = 10911 if districtW11 == 382
replace districtW11 = 10912 if districtW11 == 383
replace districtW11 = 10913 if districtW11 == 384
replace districtW11 = 10914 if districtW11 == 385
replace districtW11 = 10915 if districtW11 == 386
replace districtW11 = 10916 if districtW11 == 387
replace districtW11 = 10917 if districtW11 == 388
replace districtW11 = 10918 if districtW11 == 389
replace districtW11 = 10919 if districtW11 == 390
replace districtW11 = 10920 if districtW11 == 391
replace districtW11 = 10921 if districtW11 == 392
replace districtW11 = 10922 if districtW11 == 393
replace districtW11 = 10923 if districtW11 == 394
replace districtW11 = 10924 if districtW11 == 395
replace districtW11 = 10925 if districtW11 == 396
replace districtW11 = 10926 if districtW11 == 397
replace districtW11 = 10927 if districtW11 == 398
replace districtW11 = 10928 if districtW11 == 399
replace districtW11 = 10929 if districtW11 == 400
replace districtW11 = 10930 if districtW11 == 401
replace districtW11 = 10931 if districtW11 == 402
replace districtW11 = 10932 if districtW11 == 403
replace districtW11 = 10933 if districtW11 == 404
replace districtW11 = 10934 if districtW11 == 405
replace districtW11 = 10935 if districtW11 == 406
replace districtW11 = 10936 if districtW11 == 407
replace districtW11 = 10937 if districtW11 == 408
replace districtW11 = 10938 if districtW11 == 409
replace districtW11 = 10939 if districtW11 == 410
replace districtW11 = 10940 if districtW11 == 411
replace districtW11 = 10941 if districtW11 == 412
replace districtW11 = 10942 if districtW11 == 413
replace districtW11 = 10943 if districtW11 == 414
replace districtW11 = 10944 if districtW11 == 415
replace districtW11 = 10945 if districtW11 == 416
replace districtW11 = 10946 if districtW11 == 417
replace districtW11 = 10947 if districtW11 == 418
replace districtW11 = 10948 if districtW11 == 419
replace districtW11 = 10949 if districtW11 == 420
replace districtW11 = 10950 if districtW11 == 421
replace districtW11 = 10951 if districtW11 == 422
replace districtW11 = 10952 if districtW11 == 423
replace districtW11 = 10953 if districtW11 == 424
replace districtW11 = 10954 if districtW11 == 425
replace districtW11 = 10955 if districtW11 == 426
replace districtW11 = 10956 if districtW11 == 427
replace districtW11 = 10957 if districtW11 == 428
replace districtW11 = 10958 if districtW11 == 429
replace districtW11 = 10959 if districtW11 == 430
replace districtW11 = 10960 if districtW11 == 431
replace districtW11 = 10961 if districtW11 == 432
replace districtW11 = 10962 if districtW11 == 433
replace districtW11 = 10963 if districtW11 == 434
replace districtW11 = 10964 if districtW11 == 435
replace districtW11 = 10965 if districtW11 == 436
replace districtW11 = 10966 if districtW11 == 437
replace districtW11 = 10967 if districtW11 == 438
replace districtW11 = 10968 if districtW11 == 439
replace districtW11 = 10969 if districtW11 == 440
replace districtW11 = 10970 if districtW11 == 441
replace districtW11 = 10971 if districtW11 == 442
replace districtW11 = 10972 if districtW11 == 443
replace districtW11 = 10973 if districtW11 == 444
replace districtW11 = 10974 if districtW11 == 445
replace districtW11 = 10975 if districtW11 == 446
replace districtW11 = 10976 if districtW11 == 447
replace districtW11 = 10977 if districtW11 == 448
replace districtW11 = 10978 if districtW11 == 449
replace districtW11 = 10979 if districtW11 == 450
replace districtW11 = 10980 if districtW11 == 451
replace districtW11 = 10981 if districtW11 == 452
replace districtW11 = 10982 if districtW11 == 453
replace districtW11 = 10983 if districtW11 == 454
replace districtW11 = 10984 if districtW11 == 455
replace districtW11 = 10985 if districtW11 == 456
replace districtW11 = 10986 if districtW11 == 457
replace districtW11 = 10987 if districtW11 == 458
replace districtW11 = 10988 if districtW11 == 459
replace districtW11 = 10989 if districtW11 == 460
replace districtW11 = 10990 if districtW11 == 461
replace districtW11 = 10991 if districtW11 == 462
replace districtW11 = 10992 if districtW11 == 463
replace districtW11 = 10993 if districtW11 == 464
replace districtW11 = 10994 if districtW11 == 465
replace districtW11 = 10995 if districtW11 == 466
replace districtW11 = 10996 if districtW11 == 467
replace districtW11 = 10997 if districtW11 == 468
replace districtW11 = 10998 if districtW11 == 469
replace districtW11 = 10999 if districtW11 == 470
replace districtW11 = 11000 if districtW11 == 471
replace districtW11 = 11001 if districtW11 == 472
replace districtW11 = 11002 if districtW11 == 473
replace districtW11 = 11003 if districtW11 == 474
replace districtW11 = 11004 if districtW11 == 475
replace districtW11 = 11005 if districtW11 == 476
replace districtW11 = 11006 if districtW11 == 477
replace districtW11 = 11007 if districtW11 == 478
replace districtW11 = 11008 if districtW11 == 479
replace districtW11 = 11009 if districtW11 == 480
replace districtW11 = 11010 if districtW11 == 481
replace districtW11 = 11011 if districtW11 == 482
replace districtW11 = 11012 if districtW11 == 483
replace districtW11 = 11013 if districtW11 == 484
replace districtW11 = 11014 if districtW11 == 485
replace districtW11 = 11015 if districtW11 == 486
replace districtW11 = 11016 if districtW11 == 487
replace districtW11 = 11017 if districtW11 == 488
replace districtW11 = 11018 if districtW11 == 489
replace districtW11 = 11019 if districtW11 == 490
replace districtW11 = 11020 if districtW11 == 491
replace districtW11 = 11021 if districtW11 == 492
replace districtW11 = 11022 if districtW11 == 493
replace districtW11 = 11023 if districtW11 == 494
replace districtW11 = 11024 if districtW11 == 495
replace districtW11 = 11025 if districtW11 == 496
replace districtW11 = 11026 if districtW11 == 497
replace districtW11 = 11027 if districtW11 == 498
replace districtW11 = 11028 if districtW11 == 499
replace districtW11 = 11029 if districtW11 == 500
replace districtW11 = 11030 if districtW11 == 501
replace districtW11 = 11031 if districtW11 == 502
replace districtW11 = 11032 if districtW11 == 503
replace districtW11 = 11033 if districtW11 == 504
replace districtW11 = 11034 if districtW11 == 505
replace districtW11 = 11035 if districtW11 == 506
replace districtW11 = 11036 if districtW11 == 507
replace districtW11 = 11037 if districtW11 == 508
replace districtW11 = 11038 if districtW11 == 509
replace districtW11 = 11039 if districtW11 == 510
replace districtW11 = 11040 if districtW11 == 511
replace districtW11 = 11041 if districtW11 == 512
replace districtW11 = 11042 if districtW11 == 513
replace districtW11 = 11043 if districtW11 == 514
replace districtW11 = 11044 if districtW11 == 515
replace districtW11 = 11045 if districtW11 == 516
replace districtW11 = 11046 if districtW11 == 517
replace districtW11 = 11047 if districtW11 == 518
replace districtW11 = 11048 if districtW11 == 519
replace districtW11 = 11049 if districtW11 == 520
replace districtW11 = 11050 if districtW11 == 521
replace districtW11 = 11051 if districtW11 == 522
replace districtW11 = 11052 if districtW11 == 523
replace districtW11 = 11053 if districtW11 == 524
replace districtW11 = 11054 if districtW11 == 525
replace districtW11 = 11055 if districtW11 == 526
replace districtW11 = 11056 if districtW11 == 527
replace districtW11 = 11057 if districtW11 == 528
replace districtW11 = 11058 if districtW11 == 529
replace districtW11 = 11059 if districtW11 == 530
replace districtW11 = 11060 if districtW11 == 531
replace districtW11 = 11061 if districtW11 == 532
replace districtW11 = 11062 if districtW11 == 533
replace districtW11 = 30041 if districtW11 == 534
replace districtW11 = 30042 if districtW11 == 535
replace districtW11 = 30043 if districtW11 == 536
replace districtW11 = 30044 if districtW11 == 537
replace districtW11 = 30045 if districtW11 == 538
replace districtW11 = 30046 if districtW11 == 539
replace districtW11 = 30047 if districtW11 == 540
replace districtW11 = 30048 if districtW11 == 541
replace districtW11 = 30049 if districtW11 == 542
replace districtW11 = 30050 if districtW11 == 543
replace districtW11 = 30051 if districtW11 == 544
replace districtW11 = 30052 if districtW11 == 545
replace districtW11 = 30053 if districtW11 == 546
replace districtW11 = 30054 if districtW11 == 547
replace districtW11 = 30055 if districtW11 == 548
replace districtW11 = 30056 if districtW11 == 549
replace districtW11 = 30057 if districtW11 == 550
replace districtW11 = 30058 if districtW11 == 551
replace districtW11 = 30059 if districtW11 == 552
replace districtW11 = 30060 if districtW11 == 553
replace districtW11 = 30061 if districtW11 == 554
replace districtW11 = 30062 if districtW11 == 555
replace districtW11 = 30063 if districtW11 == 556
replace districtW11 = 30064 if districtW11 == 557
replace districtW11 = 30065 if districtW11 == 558
replace districtW11 = 30066 if districtW11 == 559
replace districtW11 = 30067 if districtW11 == 560
replace districtW11 = 30068 if districtW11 == 561
replace districtW11 = 30069 if districtW11 == 562
replace districtW11 = 30070 if districtW11 == 563
replace districtW11 = 30071 if districtW11 == 564
replace districtW11 = 30072 if districtW11 == 565
replace districtW11 = 30073 if districtW11 == 566
replace districtW11 = 30074 if districtW11 == 567
replace districtW11 = 30075 if districtW11 == 568
replace districtW11 = 30076 if districtW11 == 569
replace districtW11 = 30077 if districtW11 == 570
replace districtW11 = 30078 if districtW11 == 571
replace districtW11 = 30079 if districtW11 == 572
replace districtW11 = 30080 if districtW11 == 573
replace districtW11 = 20001 if districtW11 == 574
replace districtW11 = 20002 if districtW11 == 575
replace districtW11 = 20003 if districtW11 == 576
replace districtW11 = 20004 if districtW11 == 577
replace districtW11 = 20005 if districtW11 == 578
replace districtW11 = 20006 if districtW11 == 579
replace districtW11 = 20007 if districtW11 == 580
replace districtW11 = 20008 if districtW11 == 581
replace districtW11 = 20009 if districtW11 == 582
replace districtW11 = 20010 if districtW11 == 583
replace districtW11 = 20011 if districtW11 == 584
replace districtW11 = 20012 if districtW11 == 585
replace districtW11 = 20013 if districtW11 == 586
replace districtW11 = 20014 if districtW11 == 587
replace districtW11 = 20015 if districtW11 == 588
replace districtW11 = 20016 if districtW11 == 589
replace districtW11 = 20017 if districtW11 == 590
replace districtW11 = 20018 if districtW11 == 591
replace districtW11 = 20019 if districtW11 == 592
replace districtW11 = 20020 if districtW11 == 593
replace districtW11 = 20021 if districtW11 == 594
replace districtW11 = 20022 if districtW11 == 595
replace districtW11 = 20023 if districtW11 == 596
replace districtW11 = 20024 if districtW11 == 597
replace districtW11 = 20025 if districtW11 == 598
replace districtW11 = 20026 if districtW11 == 599
replace districtW11 = 20028 if districtW11 == 600
replace districtW11 = 20029 if districtW11 == 601
replace districtW11 = 20030 if districtW11 == 602
replace districtW11 = 20031 if districtW11 == 603
replace districtW11 = 20032 if districtW11 == 604
replace districtW11 = 20033 if districtW11 == 605
replace districtW11 = 20034 if districtW11 == 606
replace districtW11 = 20035 if districtW11 == 607
replace districtW11 = 20036 if districtW11 == 608
replace districtW11 = 20037 if districtW11 == 609
replace districtW11 = 20038 if districtW11 == 610
replace districtW11 = 20039 if districtW11 == 611
replace districtW11 = 20040 if districtW11 == 612
replace districtW11 = 20041 if districtW11 == 613
replace districtW11 = 20042 if districtW11 == 614
replace districtW11 = 20043 if districtW11 == 615
replace districtW11 = 20044 if districtW11 == 616
replace districtW11 = 20045 if districtW11 == 617
replace districtW11 = 20046 if districtW11 == 618
replace districtW11 = 20047 if districtW11 == 619
replace districtW11 = 20027 if districtW11 == 620
replace districtW11 = 20048 if districtW11 == 621
replace districtW11 = 20049 if districtW11 == 622
replace districtW11 = 20050 if districtW11 == 623
replace districtW11 = 20051 if districtW11 == 624
replace districtW11 = 20052 if districtW11 == 625
replace districtW11 = 20053 if districtW11 == 626
replace districtW11 = 20054 if districtW11 == 627
replace districtW11 = 20055 if districtW11 == 628
replace districtW11 = 20056 if districtW11 == 629
replace districtW11 = 20057 if districtW11 == 630
replace districtW11 = 20058 if districtW11 == 631
replace districtW11 = 20059 if districtW11 == 632
replace districtW11 = 40001 if districtW11 == 701
replace districtW11 = 40002 if districtW11 == 702
replace districtW11 = 40003 if districtW11 == 703
replace districtW11 = 40004 if districtW11 == 704
replace districtW11 = 40005 if districtW11 == 705
replace districtW11 = 40006 if districtW11 == 706
replace districtW11 = 40007 if districtW11 == 707
replace districtW11 = 40008 if districtW11 == 708
replace districtW11 = 40009 if districtW11 == 709
replace districtW11 = 40010 if districtW11 == 710
replace districtW11 = 40011 if districtW11 == 711
replace districtW11 = 40012 if districtW11 == 712
replace districtW11 = 40013 if districtW11 == 713
replace districtW11 = 40014 if districtW11 == 714
replace districtW11 = 40015 if districtW11 == 715
replace districtW11 = 40016 if districtW11 == 716
replace districtW11 = 40017 if districtW11 == 717
replace districtW11 = 40018 if districtW11 == 718

* Replace constituency IDs (wave 12)

gen districtW12 = pconW12

replace districtW12 = 10530 if districtW12 == 1
replace districtW12 = 10531 if districtW12 == 2
replace districtW12 = 10532 if districtW12 == 3
replace districtW12 = 10533 if districtW12 == 4
replace districtW12 = 10534 if districtW12 == 5
replace districtW12 = 10535 if districtW12 == 6
replace districtW12 = 10536 if districtW12 == 7
replace districtW12 = 10537 if districtW12 == 8
replace districtW12 = 10538 if districtW12 == 9
replace districtW12 = 10539 if districtW12 == 10
replace districtW12 = 10540 if districtW12 == 11
replace districtW12 = 10541 if districtW12 == 12
replace districtW12 = 10542 if districtW12 == 13
replace districtW12 = 10543 if districtW12 == 14
replace districtW12 = 10544 if districtW12 == 15
replace districtW12 = 10545 if districtW12 == 16
replace districtW12 = 10546 if districtW12 == 17
replace districtW12 = 10547 if districtW12 == 18
replace districtW12 = 10548 if districtW12 == 19
replace districtW12 = 10549 if districtW12 == 20
replace districtW12 = 10550 if districtW12 == 21
replace districtW12 = 10551 if districtW12 == 22
replace districtW12 = 10552 if districtW12 == 23
replace districtW12 = 10553 if districtW12 == 24
replace districtW12 = 10554 if districtW12 == 25
replace districtW12 = 10555 if districtW12 == 26
replace districtW12 = 10556 if districtW12 == 27
replace districtW12 = 10557 if districtW12 == 28
replace districtW12 = 10558 if districtW12 == 29
replace districtW12 = 10559 if districtW12 == 30
replace districtW12 = 10560 if districtW12 == 31
replace districtW12 = 10561 if districtW12 == 32
replace districtW12 = 10562 if districtW12 == 33
replace districtW12 = 10563 if districtW12 == 34
replace districtW12 = 10564 if districtW12 == 35
replace districtW12 = 10565 if districtW12 == 36
replace districtW12 = 10566 if districtW12 == 37
replace districtW12 = 10567 if districtW12 == 38
replace districtW12 = 10568 if districtW12 == 39
replace districtW12 = 10569 if districtW12 == 40
replace districtW12 = 10570 if districtW12 == 41
replace districtW12 = 10571 if districtW12 == 42
replace districtW12 = 10572 if districtW12 == 43
replace districtW12 = 10573 if districtW12 == 44
replace districtW12 = 10574 if districtW12 == 45
replace districtW12 = 10575 if districtW12 == 46
replace districtW12 = 10576 if districtW12 == 47
replace districtW12 = 10577 if districtW12 == 48
replace districtW12 = 10578 if districtW12 == 49
replace districtW12 = 10579 if districtW12 == 50
replace districtW12 = 10580 if districtW12 == 51
replace districtW12 = 10581 if districtW12 == 52
replace districtW12 = 10582 if districtW12 == 53
replace districtW12 = 10583 if districtW12 == 54
replace districtW12 = 10584 if districtW12 == 55
replace districtW12 = 10585 if districtW12 == 56
replace districtW12 = 10586 if districtW12 == 57
replace districtW12 = 10587 if districtW12 == 58
replace districtW12 = 10588 if districtW12 == 59
replace districtW12 = 10589 if districtW12 == 60
replace districtW12 = 10590 if districtW12 == 61
replace districtW12 = 10591 if districtW12 == 62
replace districtW12 = 10592 if districtW12 == 63
replace districtW12 = 10593 if districtW12 == 64
replace districtW12 = 10594 if districtW12 == 65
replace districtW12 = 10595 if districtW12 == 66
replace districtW12 = 10596 if districtW12 == 67
replace districtW12 = 10597 if districtW12 == 68
replace districtW12 = 10598 if districtW12 == 69
replace districtW12 = 10599 if districtW12 == 70
replace districtW12 = 10600 if districtW12 == 71
replace districtW12 = 10601 if districtW12 == 72
replace districtW12 = 10602 if districtW12 == 73
replace districtW12 = 10603 if districtW12 == 74
replace districtW12 = 10604 if districtW12 == 75
replace districtW12 = 10605 if districtW12 == 76
replace districtW12 = 10606 if districtW12 == 77
replace districtW12 = 10607 if districtW12 == 78
replace districtW12 = 10608 if districtW12 == 79
replace districtW12 = 10609 if districtW12 == 80
replace districtW12 = 10610 if districtW12 == 81
replace districtW12 = 10611 if districtW12 == 82
replace districtW12 = 10612 if districtW12 == 83
replace districtW12 = 10613 if districtW12 == 84
replace districtW12 = 10614 if districtW12 == 85
replace districtW12 = 10615 if districtW12 == 86
replace districtW12 = 10616 if districtW12 == 87
replace districtW12 = 10617 if districtW12 == 88
replace districtW12 = 10618 if districtW12 == 89
replace districtW12 = 10619 if districtW12 == 90
replace districtW12 = 10620 if districtW12 == 91
replace districtW12 = 10621 if districtW12 == 92
replace districtW12 = 10622 if districtW12 == 93
replace districtW12 = 10623 if districtW12 == 94
replace districtW12 = 10624 if districtW12 == 95
replace districtW12 = 10625 if districtW12 == 96
replace districtW12 = 10626 if districtW12 == 97
replace districtW12 = 10627 if districtW12 == 98
replace districtW12 = 10628 if districtW12 == 99
replace districtW12 = 10629 if districtW12 == 100
replace districtW12 = 10630 if districtW12 == 101
replace districtW12 = 10631 if districtW12 == 102
replace districtW12 = 10632 if districtW12 == 103
replace districtW12 = 10633 if districtW12 == 104
replace districtW12 = 10634 if districtW12 == 105
replace districtW12 = 10635 if districtW12 == 106
replace districtW12 = 10636 if districtW12 == 107
replace districtW12 = 10637 if districtW12 == 108
replace districtW12 = 10638 if districtW12 == 109
replace districtW12 = 10639 if districtW12 == 110
replace districtW12 = 10640 if districtW12 == 111
replace districtW12 = 10641 if districtW12 == 112
replace districtW12 = 10642 if districtW12 == 113
replace districtW12 = 10643 if districtW12 == 114
replace districtW12 = 10644 if districtW12 == 115
replace districtW12 = 10645 if districtW12 == 116
replace districtW12 = 10646 if districtW12 == 117
replace districtW12 = 10647 if districtW12 == 118
replace districtW12 = 10648 if districtW12 == 119
replace districtW12 = 10649 if districtW12 == 120
replace districtW12 = 10650 if districtW12 == 121
replace districtW12 = 10651 if districtW12 == 122
replace districtW12 = 10652 if districtW12 == 123
replace districtW12 = 10653 if districtW12 == 124
replace districtW12 = 10654 if districtW12 == 125
replace districtW12 = 10655 if districtW12 == 126
replace districtW12 = 10656 if districtW12 == 127
replace districtW12 = 10657 if districtW12 == 128
replace districtW12 = 10658 if districtW12 == 129
replace districtW12 = 10659 if districtW12 == 130
replace districtW12 = 10660 if districtW12 == 131
replace districtW12 = 10661 if districtW12 == 132
replace districtW12 = 10662 if districtW12 == 133
replace districtW12 = 10663 if districtW12 == 134
replace districtW12 = 10664 if districtW12 == 135
replace districtW12 = 10665 if districtW12 == 136
replace districtW12 = 10666 if districtW12 == 137
replace districtW12 = 10667 if districtW12 == 138
replace districtW12 = 10668 if districtW12 == 139
replace districtW12 = 10669 if districtW12 == 140
replace districtW12 = 10670 if districtW12 == 141
replace districtW12 = 10671 if districtW12 == 142
replace districtW12 = 10672 if districtW12 == 143
replace districtW12 = 10673 if districtW12 == 144
replace districtW12 = 10674 if districtW12 == 145
replace districtW12 = 10675 if districtW12 == 146
replace districtW12 = 10676 if districtW12 == 147
replace districtW12 = 10677 if districtW12 == 148
replace districtW12 = 10678 if districtW12 == 149
replace districtW12 = 10679 if districtW12 == 150
replace districtW12 = 10680 if districtW12 == 151
replace districtW12 = 10681 if districtW12 == 152
replace districtW12 = 10682 if districtW12 == 153
replace districtW12 = 10683 if districtW12 == 154
replace districtW12 = 10684 if districtW12 == 155
replace districtW12 = 10685 if districtW12 == 156
replace districtW12 = 10686 if districtW12 == 157
replace districtW12 = 10687 if districtW12 == 158
replace districtW12 = 10688 if districtW12 == 159
replace districtW12 = 10689 if districtW12 == 160
replace districtW12 = 10690 if districtW12 == 161
replace districtW12 = 10691 if districtW12 == 162
replace districtW12 = 10692 if districtW12 == 163
replace districtW12 = 10693 if districtW12 == 164
replace districtW12 = 10694 if districtW12 == 165
replace districtW12 = 10695 if districtW12 == 166
replace districtW12 = 10696 if districtW12 == 167
replace districtW12 = 10697 if districtW12 == 168
replace districtW12 = 10698 if districtW12 == 169
replace districtW12 = 10699 if districtW12 == 170
replace districtW12 = 10700 if districtW12 == 171
replace districtW12 = 10701 if districtW12 == 172
replace districtW12 = 10702 if districtW12 == 173
replace districtW12 = 10703 if districtW12 == 174
replace districtW12 = 10704 if districtW12 == 175
replace districtW12 = 10705 if districtW12 == 176
replace districtW12 = 10706 if districtW12 == 177
replace districtW12 = 10707 if districtW12 == 178
replace districtW12 = 10708 if districtW12 == 179
replace districtW12 = 10709 if districtW12 == 180
replace districtW12 = 10710 if districtW12 == 181
replace districtW12 = 10711 if districtW12 == 182
replace districtW12 = 10712 if districtW12 == 183
replace districtW12 = 10713 if districtW12 == 184
replace districtW12 = 10714 if districtW12 == 185
replace districtW12 = 10715 if districtW12 == 186
replace districtW12 = 10716 if districtW12 == 187
replace districtW12 = 10717 if districtW12 == 188
replace districtW12 = 10718 if districtW12 == 189
replace districtW12 = 10719 if districtW12 == 190
replace districtW12 = 10720 if districtW12 == 191
replace districtW12 = 10721 if districtW12 == 192
replace districtW12 = 10722 if districtW12 == 193
replace districtW12 = 10723 if districtW12 == 194
replace districtW12 = 10724 if districtW12 == 195
replace districtW12 = 10725 if districtW12 == 196
replace districtW12 = 10726 if districtW12 == 197
replace districtW12 = 10727 if districtW12 == 198
replace districtW12 = 10728 if districtW12 == 199
replace districtW12 = 10729 if districtW12 == 200
replace districtW12 = 10730 if districtW12 == 201
replace districtW12 = 10731 if districtW12 == 202
replace districtW12 = 10732 if districtW12 == 203
replace districtW12 = 10733 if districtW12 == 204
replace districtW12 = 10734 if districtW12 == 205
replace districtW12 = 10735 if districtW12 == 206
replace districtW12 = 10736 if districtW12 == 207
replace districtW12 = 10737 if districtW12 == 208
replace districtW12 = 10738 if districtW12 == 209
replace districtW12 = 10739 if districtW12 == 210
replace districtW12 = 10740 if districtW12 == 211
replace districtW12 = 10741 if districtW12 == 212
replace districtW12 = 10742 if districtW12 == 213
replace districtW12 = 10743 if districtW12 == 214
replace districtW12 = 10744 if districtW12 == 215
replace districtW12 = 10745 if districtW12 == 216
replace districtW12 = 10746 if districtW12 == 217
replace districtW12 = 10747 if districtW12 == 218
replace districtW12 = 10748 if districtW12 == 219
replace districtW12 = 10749 if districtW12 == 220
replace districtW12 = 10750 if districtW12 == 221
replace districtW12 = 10751 if districtW12 == 222
replace districtW12 = 10752 if districtW12 == 223
replace districtW12 = 10753 if districtW12 == 224
replace districtW12 = 10754 if districtW12 == 225
replace districtW12 = 10755 if districtW12 == 226
replace districtW12 = 10756 if districtW12 == 227
replace districtW12 = 10757 if districtW12 == 228
replace districtW12 = 10758 if districtW12 == 229
replace districtW12 = 10759 if districtW12 == 230
replace districtW12 = 10760 if districtW12 == 231
replace districtW12 = 10761 if districtW12 == 232
replace districtW12 = 10762 if districtW12 == 233
replace districtW12 = 10763 if districtW12 == 234
replace districtW12 = 10764 if districtW12 == 235
replace districtW12 = 10765 if districtW12 == 236
replace districtW12 = 10766 if districtW12 == 237
replace districtW12 = 10767 if districtW12 == 238
replace districtW12 = 10768 if districtW12 == 239
replace districtW12 = 10769 if districtW12 == 240
replace districtW12 = 10770 if districtW12 == 241
replace districtW12 = 10771 if districtW12 == 242
replace districtW12 = 10772 if districtW12 == 243
replace districtW12 = 10773 if districtW12 == 244
replace districtW12 = 10774 if districtW12 == 245
replace districtW12 = 10775 if districtW12 == 246
replace districtW12 = 10776 if districtW12 == 247
replace districtW12 = 10777 if districtW12 == 248
replace districtW12 = 10778 if districtW12 == 249
replace districtW12 = 10779 if districtW12 == 250
replace districtW12 = 10780 if districtW12 == 251
replace districtW12 = 10781 if districtW12 == 252
replace districtW12 = 10782 if districtW12 == 253
replace districtW12 = 10783 if districtW12 == 254
replace districtW12 = 10784 if districtW12 == 255
replace districtW12 = 10785 if districtW12 == 256
replace districtW12 = 10786 if districtW12 == 257
replace districtW12 = 10787 if districtW12 == 258
replace districtW12 = 10788 if districtW12 == 259
replace districtW12 = 10789 if districtW12 == 260
replace districtW12 = 10790 if districtW12 == 261
replace districtW12 = 10791 if districtW12 == 262
replace districtW12 = 10792 if districtW12 == 263
replace districtW12 = 10793 if districtW12 == 264
replace districtW12 = 10794 if districtW12 == 265
replace districtW12 = 10795 if districtW12 == 266
replace districtW12 = 10796 if districtW12 == 267
replace districtW12 = 10797 if districtW12 == 268
replace districtW12 = 10798 if districtW12 == 269
replace districtW12 = 10799 if districtW12 == 270
replace districtW12 = 10800 if districtW12 == 271
replace districtW12 = 10801 if districtW12 == 272
replace districtW12 = 10802 if districtW12 == 273
replace districtW12 = 10803 if districtW12 == 274
replace districtW12 = 10804 if districtW12 == 275
replace districtW12 = 10805 if districtW12 == 276
replace districtW12 = 10806 if districtW12 == 277
replace districtW12 = 10807 if districtW12 == 278
replace districtW12 = 10808 if districtW12 == 279
replace districtW12 = 10809 if districtW12 == 280
replace districtW12 = 10810 if districtW12 == 281
replace districtW12 = 10811 if districtW12 == 282
replace districtW12 = 10812 if districtW12 == 283
replace districtW12 = 10813 if districtW12 == 284
replace districtW12 = 10814 if districtW12 == 285
replace districtW12 = 10815 if districtW12 == 286
replace districtW12 = 10816 if districtW12 == 287
replace districtW12 = 10817 if districtW12 == 288
replace districtW12 = 10818 if districtW12 == 289
replace districtW12 = 10819 if districtW12 == 290
replace districtW12 = 10820 if districtW12 == 291
replace districtW12 = 10821 if districtW12 == 292
replace districtW12 = 10822 if districtW12 == 293
replace districtW12 = 10823 if districtW12 == 294
replace districtW12 = 10824 if districtW12 == 295
replace districtW12 = 10825 if districtW12 == 296
replace districtW12 = 10826 if districtW12 == 297
replace districtW12 = 10827 if districtW12 == 298
replace districtW12 = 10828 if districtW12 == 299
replace districtW12 = 10829 if districtW12 == 300
replace districtW12 = 10830 if districtW12 == 301
replace districtW12 = 10831 if districtW12 == 302
replace districtW12 = 10832 if districtW12 == 303
replace districtW12 = 10833 if districtW12 == 304
replace districtW12 = 10834 if districtW12 == 305
replace districtW12 = 10835 if districtW12 == 306
replace districtW12 = 10836 if districtW12 == 307
replace districtW12 = 10837 if districtW12 == 308
replace districtW12 = 10838 if districtW12 == 309
replace districtW12 = 10839 if districtW12 == 310
replace districtW12 = 10840 if districtW12 == 311
replace districtW12 = 10841 if districtW12 == 312
replace districtW12 = 10842 if districtW12 == 313
replace districtW12 = 10843 if districtW12 == 314
replace districtW12 = 10844 if districtW12 == 315
replace districtW12 = 10845 if districtW12 == 316
replace districtW12 = 10846 if districtW12 == 317
replace districtW12 = 10847 if districtW12 == 318
replace districtW12 = 10848 if districtW12 == 319
replace districtW12 = 10849 if districtW12 == 320
replace districtW12 = 10850 if districtW12 == 321
replace districtW12 = 10851 if districtW12 == 322
replace districtW12 = 10852 if districtW12 == 323
replace districtW12 = 10853 if districtW12 == 324
replace districtW12 = 10854 if districtW12 == 325
replace districtW12 = 10855 if districtW12 == 326
replace districtW12 = 10856 if districtW12 == 327
replace districtW12 = 10857 if districtW12 == 328
replace districtW12 = 10858 if districtW12 == 329
replace districtW12 = 10859 if districtW12 == 330
replace districtW12 = 10860 if districtW12 == 331
replace districtW12 = 10861 if districtW12 == 332
replace districtW12 = 10862 if districtW12 == 333
replace districtW12 = 10863 if districtW12 == 334
replace districtW12 = 10864 if districtW12 == 335
replace districtW12 = 10865 if districtW12 == 336
replace districtW12 = 10866 if districtW12 == 337
replace districtW12 = 10867 if districtW12 == 338
replace districtW12 = 10868 if districtW12 == 339
replace districtW12 = 10869 if districtW12 == 340
replace districtW12 = 10870 if districtW12 == 341
replace districtW12 = 10871 if districtW12 == 342
replace districtW12 = 10872 if districtW12 == 343
replace districtW12 = 10873 if districtW12 == 344
replace districtW12 = 10874 if districtW12 == 345
replace districtW12 = 10875 if districtW12 == 346
replace districtW12 = 10876 if districtW12 == 347
replace districtW12 = 10877 if districtW12 == 348
replace districtW12 = 10878 if districtW12 == 349
replace districtW12 = 10879 if districtW12 == 350
replace districtW12 = 10880 if districtW12 == 351
replace districtW12 = 10881 if districtW12 == 352
replace districtW12 = 10882 if districtW12 == 353
replace districtW12 = 10883 if districtW12 == 354
replace districtW12 = 10884 if districtW12 == 355
replace districtW12 = 10885 if districtW12 == 356
replace districtW12 = 10886 if districtW12 == 357
replace districtW12 = 10887 if districtW12 == 358
replace districtW12 = 10888 if districtW12 == 359
replace districtW12 = 10889 if districtW12 == 360
replace districtW12 = 10890 if districtW12 == 361
replace districtW12 = 10891 if districtW12 == 362
replace districtW12 = 10892 if districtW12 == 363
replace districtW12 = 10893 if districtW12 == 364
replace districtW12 = 10894 if districtW12 == 365
replace districtW12 = 10895 if districtW12 == 366
replace districtW12 = 10896 if districtW12 == 367
replace districtW12 = 10897 if districtW12 == 368
replace districtW12 = 10898 if districtW12 == 369
replace districtW12 = 10899 if districtW12 == 370
replace districtW12 = 10900 if districtW12 == 371
replace districtW12 = 10901 if districtW12 == 372
replace districtW12 = 10902 if districtW12 == 373
replace districtW12 = 10903 if districtW12 == 374
replace districtW12 = 10904 if districtW12 == 375
replace districtW12 = 10905 if districtW12 == 376
replace districtW12 = 10906 if districtW12 == 377
replace districtW12 = 10907 if districtW12 == 378
replace districtW12 = 10908 if districtW12 == 379
replace districtW12 = 10909 if districtW12 == 380
replace districtW12 = 10910 if districtW12 == 381
replace districtW12 = 10911 if districtW12 == 382
replace districtW12 = 10912 if districtW12 == 383
replace districtW12 = 10913 if districtW12 == 384
replace districtW12 = 10914 if districtW12 == 385
replace districtW12 = 10915 if districtW12 == 386
replace districtW12 = 10916 if districtW12 == 387
replace districtW12 = 10917 if districtW12 == 388
replace districtW12 = 10918 if districtW12 == 389
replace districtW12 = 10919 if districtW12 == 390
replace districtW12 = 10920 if districtW12 == 391
replace districtW12 = 10921 if districtW12 == 392
replace districtW12 = 10922 if districtW12 == 393
replace districtW12 = 10923 if districtW12 == 394
replace districtW12 = 10924 if districtW12 == 395
replace districtW12 = 10925 if districtW12 == 396
replace districtW12 = 10926 if districtW12 == 397
replace districtW12 = 10927 if districtW12 == 398
replace districtW12 = 10928 if districtW12 == 399
replace districtW12 = 10929 if districtW12 == 400
replace districtW12 = 10930 if districtW12 == 401
replace districtW12 = 10931 if districtW12 == 402
replace districtW12 = 10932 if districtW12 == 403
replace districtW12 = 10933 if districtW12 == 404
replace districtW12 = 10934 if districtW12 == 405
replace districtW12 = 10935 if districtW12 == 406
replace districtW12 = 10936 if districtW12 == 407
replace districtW12 = 10937 if districtW12 == 408
replace districtW12 = 10938 if districtW12 == 409
replace districtW12 = 10939 if districtW12 == 410
replace districtW12 = 10940 if districtW12 == 411
replace districtW12 = 10941 if districtW12 == 412
replace districtW12 = 10942 if districtW12 == 413
replace districtW12 = 10943 if districtW12 == 414
replace districtW12 = 10944 if districtW12 == 415
replace districtW12 = 10945 if districtW12 == 416
replace districtW12 = 10946 if districtW12 == 417
replace districtW12 = 10947 if districtW12 == 418
replace districtW12 = 10948 if districtW12 == 419
replace districtW12 = 10949 if districtW12 == 420
replace districtW12 = 10950 if districtW12 == 421
replace districtW12 = 10951 if districtW12 == 422
replace districtW12 = 10952 if districtW12 == 423
replace districtW12 = 10953 if districtW12 == 424
replace districtW12 = 10954 if districtW12 == 425
replace districtW12 = 10955 if districtW12 == 426
replace districtW12 = 10956 if districtW12 == 427
replace districtW12 = 10957 if districtW12 == 428
replace districtW12 = 10958 if districtW12 == 429
replace districtW12 = 10959 if districtW12 == 430
replace districtW12 = 10960 if districtW12 == 431
replace districtW12 = 10961 if districtW12 == 432
replace districtW12 = 10962 if districtW12 == 433
replace districtW12 = 10963 if districtW12 == 434
replace districtW12 = 10964 if districtW12 == 435
replace districtW12 = 10965 if districtW12 == 436
replace districtW12 = 10966 if districtW12 == 437
replace districtW12 = 10967 if districtW12 == 438
replace districtW12 = 10968 if districtW12 == 439
replace districtW12 = 10969 if districtW12 == 440
replace districtW12 = 10970 if districtW12 == 441
replace districtW12 = 10971 if districtW12 == 442
replace districtW12 = 10972 if districtW12 == 443
replace districtW12 = 10973 if districtW12 == 444
replace districtW12 = 10974 if districtW12 == 445
replace districtW12 = 10975 if districtW12 == 446
replace districtW12 = 10976 if districtW12 == 447
replace districtW12 = 10977 if districtW12 == 448
replace districtW12 = 10978 if districtW12 == 449
replace districtW12 = 10979 if districtW12 == 450
replace districtW12 = 10980 if districtW12 == 451
replace districtW12 = 10981 if districtW12 == 452
replace districtW12 = 10982 if districtW12 == 453
replace districtW12 = 10983 if districtW12 == 454
replace districtW12 = 10984 if districtW12 == 455
replace districtW12 = 10985 if districtW12 == 456
replace districtW12 = 10986 if districtW12 == 457
replace districtW12 = 10987 if districtW12 == 458
replace districtW12 = 10988 if districtW12 == 459
replace districtW12 = 10989 if districtW12 == 460
replace districtW12 = 10990 if districtW12 == 461
replace districtW12 = 10991 if districtW12 == 462
replace districtW12 = 10992 if districtW12 == 463
replace districtW12 = 10993 if districtW12 == 464
replace districtW12 = 10994 if districtW12 == 465
replace districtW12 = 10995 if districtW12 == 466
replace districtW12 = 10996 if districtW12 == 467
replace districtW12 = 10997 if districtW12 == 468
replace districtW12 = 10998 if districtW12 == 469
replace districtW12 = 10999 if districtW12 == 470
replace districtW12 = 11000 if districtW12 == 471
replace districtW12 = 11001 if districtW12 == 472
replace districtW12 = 11002 if districtW12 == 473
replace districtW12 = 11003 if districtW12 == 474
replace districtW12 = 11004 if districtW12 == 475
replace districtW12 = 11005 if districtW12 == 476
replace districtW12 = 11006 if districtW12 == 477
replace districtW12 = 11007 if districtW12 == 478
replace districtW12 = 11008 if districtW12 == 479
replace districtW12 = 11009 if districtW12 == 480
replace districtW12 = 11010 if districtW12 == 481
replace districtW12 = 11011 if districtW12 == 482
replace districtW12 = 11012 if districtW12 == 483
replace districtW12 = 11013 if districtW12 == 484
replace districtW12 = 11014 if districtW12 == 485
replace districtW12 = 11015 if districtW12 == 486
replace districtW12 = 11016 if districtW12 == 487
replace districtW12 = 11017 if districtW12 == 488
replace districtW12 = 11018 if districtW12 == 489
replace districtW12 = 11019 if districtW12 == 490
replace districtW12 = 11020 if districtW12 == 491
replace districtW12 = 11021 if districtW12 == 492
replace districtW12 = 11022 if districtW12 == 493
replace districtW12 = 11023 if districtW12 == 494
replace districtW12 = 11024 if districtW12 == 495
replace districtW12 = 11025 if districtW12 == 496
replace districtW12 = 11026 if districtW12 == 497
replace districtW12 = 11027 if districtW12 == 498
replace districtW12 = 11028 if districtW12 == 499
replace districtW12 = 11029 if districtW12 == 500
replace districtW12 = 11030 if districtW12 == 501
replace districtW12 = 11031 if districtW12 == 502
replace districtW12 = 11032 if districtW12 == 503
replace districtW12 = 11033 if districtW12 == 504
replace districtW12 = 11034 if districtW12 == 505
replace districtW12 = 11035 if districtW12 == 506
replace districtW12 = 11036 if districtW12 == 507
replace districtW12 = 11037 if districtW12 == 508
replace districtW12 = 11038 if districtW12 == 509
replace districtW12 = 11039 if districtW12 == 510
replace districtW12 = 11040 if districtW12 == 511
replace districtW12 = 11041 if districtW12 == 512
replace districtW12 = 11042 if districtW12 == 513
replace districtW12 = 11043 if districtW12 == 514
replace districtW12 = 11044 if districtW12 == 515
replace districtW12 = 11045 if districtW12 == 516
replace districtW12 = 11046 if districtW12 == 517
replace districtW12 = 11047 if districtW12 == 518
replace districtW12 = 11048 if districtW12 == 519
replace districtW12 = 11049 if districtW12 == 520
replace districtW12 = 11050 if districtW12 == 521
replace districtW12 = 11051 if districtW12 == 522
replace districtW12 = 11052 if districtW12 == 523
replace districtW12 = 11053 if districtW12 == 524
replace districtW12 = 11054 if districtW12 == 525
replace districtW12 = 11055 if districtW12 == 526
replace districtW12 = 11056 if districtW12 == 527
replace districtW12 = 11057 if districtW12 == 528
replace districtW12 = 11058 if districtW12 == 529
replace districtW12 = 11059 if districtW12 == 530
replace districtW12 = 11060 if districtW12 == 531
replace districtW12 = 11061 if districtW12 == 532
replace districtW12 = 11062 if districtW12 == 533
replace districtW12 = 30041 if districtW12 == 534
replace districtW12 = 30042 if districtW12 == 535
replace districtW12 = 30043 if districtW12 == 536
replace districtW12 = 30044 if districtW12 == 537
replace districtW12 = 30045 if districtW12 == 538
replace districtW12 = 30046 if districtW12 == 539
replace districtW12 = 30047 if districtW12 == 540
replace districtW12 = 30048 if districtW12 == 541
replace districtW12 = 30049 if districtW12 == 542
replace districtW12 = 30050 if districtW12 == 543
replace districtW12 = 30051 if districtW12 == 544
replace districtW12 = 30052 if districtW12 == 545
replace districtW12 = 30053 if districtW12 == 546
replace districtW12 = 30054 if districtW12 == 547
replace districtW12 = 30055 if districtW12 == 548
replace districtW12 = 30056 if districtW12 == 549
replace districtW12 = 30057 if districtW12 == 550
replace districtW12 = 30058 if districtW12 == 551
replace districtW12 = 30059 if districtW12 == 552
replace districtW12 = 30060 if districtW12 == 553
replace districtW12 = 30061 if districtW12 == 554
replace districtW12 = 30062 if districtW12 == 555
replace districtW12 = 30063 if districtW12 == 556
replace districtW12 = 30064 if districtW12 == 557
replace districtW12 = 30065 if districtW12 == 558
replace districtW12 = 30066 if districtW12 == 559
replace districtW12 = 30067 if districtW12 == 560
replace districtW12 = 30068 if districtW12 == 561
replace districtW12 = 30069 if districtW12 == 562
replace districtW12 = 30070 if districtW12 == 563
replace districtW12 = 30071 if districtW12 == 564
replace districtW12 = 30072 if districtW12 == 565
replace districtW12 = 30073 if districtW12 == 566
replace districtW12 = 30074 if districtW12 == 567
replace districtW12 = 30075 if districtW12 == 568
replace districtW12 = 30076 if districtW12 == 569
replace districtW12 = 30077 if districtW12 == 570
replace districtW12 = 30078 if districtW12 == 571
replace districtW12 = 30079 if districtW12 == 572
replace districtW12 = 30080 if districtW12 == 573
replace districtW12 = 20001 if districtW12 == 574
replace districtW12 = 20002 if districtW12 == 575
replace districtW12 = 20003 if districtW12 == 576
replace districtW12 = 20004 if districtW12 == 577
replace districtW12 = 20005 if districtW12 == 578
replace districtW12 = 20006 if districtW12 == 579
replace districtW12 = 20007 if districtW12 == 580
replace districtW12 = 20008 if districtW12 == 581
replace districtW12 = 20009 if districtW12 == 582
replace districtW12 = 20010 if districtW12 == 583
replace districtW12 = 20011 if districtW12 == 584
replace districtW12 = 20012 if districtW12 == 585
replace districtW12 = 20013 if districtW12 == 586
replace districtW12 = 20014 if districtW12 == 587
replace districtW12 = 20015 if districtW12 == 588
replace districtW12 = 20016 if districtW12 == 589
replace districtW12 = 20017 if districtW12 == 590
replace districtW12 = 20018 if districtW12 == 591
replace districtW12 = 20019 if districtW12 == 592
replace districtW12 = 20020 if districtW12 == 593
replace districtW12 = 20021 if districtW12 == 594
replace districtW12 = 20022 if districtW12 == 595
replace districtW12 = 20023 if districtW12 == 596
replace districtW12 = 20024 if districtW12 == 597
replace districtW12 = 20025 if districtW12 == 598
replace districtW12 = 20026 if districtW12 == 599
replace districtW12 = 20028 if districtW12 == 600
replace districtW12 = 20029 if districtW12 == 601
replace districtW12 = 20030 if districtW12 == 602
replace districtW12 = 20031 if districtW12 == 603
replace districtW12 = 20032 if districtW12 == 604
replace districtW12 = 20033 if districtW12 == 605
replace districtW12 = 20034 if districtW12 == 606
replace districtW12 = 20035 if districtW12 == 607
replace districtW12 = 20036 if districtW12 == 608
replace districtW12 = 20037 if districtW12 == 609
replace districtW12 = 20038 if districtW12 == 610
replace districtW12 = 20039 if districtW12 == 611
replace districtW12 = 20040 if districtW12 == 612
replace districtW12 = 20041 if districtW12 == 613
replace districtW12 = 20042 if districtW12 == 614
replace districtW12 = 20043 if districtW12 == 615
replace districtW12 = 20044 if districtW12 == 616
replace districtW12 = 20045 if districtW12 == 617
replace districtW12 = 20046 if districtW12 == 618
replace districtW12 = 20047 if districtW12 == 619
replace districtW12 = 20027 if districtW12 == 620
replace districtW12 = 20048 if districtW12 == 621
replace districtW12 = 20049 if districtW12 == 622
replace districtW12 = 20050 if districtW12 == 623
replace districtW12 = 20051 if districtW12 == 624
replace districtW12 = 20052 if districtW12 == 625
replace districtW12 = 20053 if districtW12 == 626
replace districtW12 = 20054 if districtW12 == 627
replace districtW12 = 20055 if districtW12 == 628
replace districtW12 = 20056 if districtW12 == 629
replace districtW12 = 20057 if districtW12 == 630
replace districtW12 = 20058 if districtW12 == 631
replace districtW12 = 20059 if districtW12 == 632
replace districtW12 = 40001 if districtW12 == 701
replace districtW12 = 40002 if districtW12 == 702
replace districtW12 = 40003 if districtW12 == 703
replace districtW12 = 40004 if districtW12 == 704
replace districtW12 = 40005 if districtW12 == 705
replace districtW12 = 40006 if districtW12 == 706
replace districtW12 = 40007 if districtW12 == 707
replace districtW12 = 40008 if districtW12 == 708
replace districtW12 = 40009 if districtW12 == 709
replace districtW12 = 40010 if districtW12 == 710
replace districtW12 = 40011 if districtW12 == 711
replace districtW12 = 40012 if districtW12 == 712
replace districtW12 = 40013 if districtW12 == 713
replace districtW12 = 40014 if districtW12 == 714
replace districtW12 = 40015 if districtW12 == 715
replace districtW12 = 40016 if districtW12 == 716
replace districtW12 = 40017 if districtW12 == 717
replace districtW12 = 40018 if districtW12 == 718

* Replace constituency IDs (wave 17)

gen districtW17 = pconW17

replace districtW17 = 10530 if districtW17 == 1
replace districtW17 = 10531 if districtW17 == 2
replace districtW17 = 10532 if districtW17 == 3
replace districtW17 = 10533 if districtW17 == 4
replace districtW17 = 10534 if districtW17 == 5
replace districtW17 = 10535 if districtW17 == 6
replace districtW17 = 10536 if districtW17 == 7
replace districtW17 = 10537 if districtW17 == 8
replace districtW17 = 10538 if districtW17 == 9
replace districtW17 = 10539 if districtW17 == 10
replace districtW17 = 10540 if districtW17 == 11
replace districtW17 = 10541 if districtW17 == 12
replace districtW17 = 10542 if districtW17 == 13
replace districtW17 = 10543 if districtW17 == 14
replace districtW17 = 10544 if districtW17 == 15
replace districtW17 = 10545 if districtW17 == 16
replace districtW17 = 10546 if districtW17 == 17
replace districtW17 = 10547 if districtW17 == 18
replace districtW17 = 10548 if districtW17 == 19
replace districtW17 = 10549 if districtW17 == 20
replace districtW17 = 10550 if districtW17 == 21
replace districtW17 = 10551 if districtW17 == 22
replace districtW17 = 10552 if districtW17 == 23
replace districtW17 = 10553 if districtW17 == 24
replace districtW17 = 10554 if districtW17 == 25
replace districtW17 = 10555 if districtW17 == 26
replace districtW17 = 10556 if districtW17 == 27
replace districtW17 = 10557 if districtW17 == 28
replace districtW17 = 10558 if districtW17 == 29
replace districtW17 = 10559 if districtW17 == 30
replace districtW17 = 10560 if districtW17 == 31
replace districtW17 = 10561 if districtW17 == 32
replace districtW17 = 10562 if districtW17 == 33
replace districtW17 = 10563 if districtW17 == 34
replace districtW17 = 10564 if districtW17 == 35
replace districtW17 = 10565 if districtW17 == 36
replace districtW17 = 10566 if districtW17 == 37
replace districtW17 = 10567 if districtW17 == 38
replace districtW17 = 10568 if districtW17 == 39
replace districtW17 = 10569 if districtW17 == 40
replace districtW17 = 10570 if districtW17 == 41
replace districtW17 = 10571 if districtW17 == 42
replace districtW17 = 10572 if districtW17 == 43
replace districtW17 = 10573 if districtW17 == 44
replace districtW17 = 10574 if districtW17 == 45
replace districtW17 = 10575 if districtW17 == 46
replace districtW17 = 10576 if districtW17 == 47
replace districtW17 = 10577 if districtW17 == 48
replace districtW17 = 10578 if districtW17 == 49
replace districtW17 = 10579 if districtW17 == 50
replace districtW17 = 10580 if districtW17 == 51
replace districtW17 = 10581 if districtW17 == 52
replace districtW17 = 10582 if districtW17 == 53
replace districtW17 = 10583 if districtW17 == 54
replace districtW17 = 10584 if districtW17 == 55
replace districtW17 = 10585 if districtW17 == 56
replace districtW17 = 10586 if districtW17 == 57
replace districtW17 = 10587 if districtW17 == 58
replace districtW17 = 10588 if districtW17 == 59
replace districtW17 = 10589 if districtW17 == 60
replace districtW17 = 10590 if districtW17 == 61
replace districtW17 = 10591 if districtW17 == 62
replace districtW17 = 10592 if districtW17 == 63
replace districtW17 = 10593 if districtW17 == 64
replace districtW17 = 10594 if districtW17 == 65
replace districtW17 = 10595 if districtW17 == 66
replace districtW17 = 10596 if districtW17 == 67
replace districtW17 = 10597 if districtW17 == 68
replace districtW17 = 10598 if districtW17 == 69
replace districtW17 = 10599 if districtW17 == 70
replace districtW17 = 10600 if districtW17 == 71
replace districtW17 = 10601 if districtW17 == 72
replace districtW17 = 10602 if districtW17 == 73
replace districtW17 = 10603 if districtW17 == 74
replace districtW17 = 10604 if districtW17 == 75
replace districtW17 = 10605 if districtW17 == 76
replace districtW17 = 10606 if districtW17 == 77
replace districtW17 = 10607 if districtW17 == 78
replace districtW17 = 10608 if districtW17 == 79
replace districtW17 = 10609 if districtW17 == 80
replace districtW17 = 10610 if districtW17 == 81
replace districtW17 = 10611 if districtW17 == 82
replace districtW17 = 10612 if districtW17 == 83
replace districtW17 = 10613 if districtW17 == 84
replace districtW17 = 10614 if districtW17 == 85
replace districtW17 = 10615 if districtW17 == 86
replace districtW17 = 10616 if districtW17 == 87
replace districtW17 = 10617 if districtW17 == 88
replace districtW17 = 10618 if districtW17 == 89
replace districtW17 = 10619 if districtW17 == 90
replace districtW17 = 10620 if districtW17 == 91
replace districtW17 = 10621 if districtW17 == 92
replace districtW17 = 10622 if districtW17 == 93
replace districtW17 = 10623 if districtW17 == 94
replace districtW17 = 10624 if districtW17 == 95
replace districtW17 = 10625 if districtW17 == 96
replace districtW17 = 10626 if districtW17 == 97
replace districtW17 = 10627 if districtW17 == 98
replace districtW17 = 10628 if districtW17 == 99
replace districtW17 = 10629 if districtW17 == 100
replace districtW17 = 10630 if districtW17 == 101
replace districtW17 = 10631 if districtW17 == 102
replace districtW17 = 10632 if districtW17 == 103
replace districtW17 = 10633 if districtW17 == 104
replace districtW17 = 10634 if districtW17 == 105
replace districtW17 = 10635 if districtW17 == 106
replace districtW17 = 10636 if districtW17 == 107
replace districtW17 = 10637 if districtW17 == 108
replace districtW17 = 10638 if districtW17 == 109
replace districtW17 = 10639 if districtW17 == 110
replace districtW17 = 10640 if districtW17 == 111
replace districtW17 = 10641 if districtW17 == 112
replace districtW17 = 10642 if districtW17 == 113
replace districtW17 = 10643 if districtW17 == 114
replace districtW17 = 10644 if districtW17 == 115
replace districtW17 = 10645 if districtW17 == 116
replace districtW17 = 10646 if districtW17 == 117
replace districtW17 = 10647 if districtW17 == 118
replace districtW17 = 10648 if districtW17 == 119
replace districtW17 = 10649 if districtW17 == 120
replace districtW17 = 10650 if districtW17 == 121
replace districtW17 = 10651 if districtW17 == 122
replace districtW17 = 10652 if districtW17 == 123
replace districtW17 = 10653 if districtW17 == 124
replace districtW17 = 10654 if districtW17 == 125
replace districtW17 = 10655 if districtW17 == 126
replace districtW17 = 10656 if districtW17 == 127
replace districtW17 = 10657 if districtW17 == 128
replace districtW17 = 10658 if districtW17 == 129
replace districtW17 = 10659 if districtW17 == 130
replace districtW17 = 10660 if districtW17 == 131
replace districtW17 = 10661 if districtW17 == 132
replace districtW17 = 10662 if districtW17 == 133
replace districtW17 = 10663 if districtW17 == 134
replace districtW17 = 10664 if districtW17 == 135
replace districtW17 = 10665 if districtW17 == 136
replace districtW17 = 10666 if districtW17 == 137
replace districtW17 = 10667 if districtW17 == 138
replace districtW17 = 10668 if districtW17 == 139
replace districtW17 = 10669 if districtW17 == 140
replace districtW17 = 10670 if districtW17 == 141
replace districtW17 = 10671 if districtW17 == 142
replace districtW17 = 10672 if districtW17 == 143
replace districtW17 = 10673 if districtW17 == 144
replace districtW17 = 10674 if districtW17 == 145
replace districtW17 = 10675 if districtW17 == 146
replace districtW17 = 10676 if districtW17 == 147
replace districtW17 = 10677 if districtW17 == 148
replace districtW17 = 10678 if districtW17 == 149
replace districtW17 = 10679 if districtW17 == 150
replace districtW17 = 10680 if districtW17 == 151
replace districtW17 = 10681 if districtW17 == 152
replace districtW17 = 10682 if districtW17 == 153
replace districtW17 = 10683 if districtW17 == 154
replace districtW17 = 10684 if districtW17 == 155
replace districtW17 = 10685 if districtW17 == 156
replace districtW17 = 10686 if districtW17 == 157
replace districtW17 = 10687 if districtW17 == 158
replace districtW17 = 10688 if districtW17 == 159
replace districtW17 = 10689 if districtW17 == 160
replace districtW17 = 10690 if districtW17 == 161
replace districtW17 = 10691 if districtW17 == 162
replace districtW17 = 10692 if districtW17 == 163
replace districtW17 = 10693 if districtW17 == 164
replace districtW17 = 10694 if districtW17 == 165
replace districtW17 = 10695 if districtW17 == 166
replace districtW17 = 10696 if districtW17 == 167
replace districtW17 = 10697 if districtW17 == 168
replace districtW17 = 10698 if districtW17 == 169
replace districtW17 = 10699 if districtW17 == 170
replace districtW17 = 10700 if districtW17 == 171
replace districtW17 = 10701 if districtW17 == 172
replace districtW17 = 10702 if districtW17 == 173
replace districtW17 = 10703 if districtW17 == 174
replace districtW17 = 10704 if districtW17 == 175
replace districtW17 = 10705 if districtW17 == 176
replace districtW17 = 10706 if districtW17 == 177
replace districtW17 = 10707 if districtW17 == 178
replace districtW17 = 10708 if districtW17 == 179
replace districtW17 = 10709 if districtW17 == 180
replace districtW17 = 10710 if districtW17 == 181
replace districtW17 = 10711 if districtW17 == 182
replace districtW17 = 10712 if districtW17 == 183
replace districtW17 = 10713 if districtW17 == 184
replace districtW17 = 10714 if districtW17 == 185
replace districtW17 = 10715 if districtW17 == 186
replace districtW17 = 10716 if districtW17 == 187
replace districtW17 = 10717 if districtW17 == 188
replace districtW17 = 10718 if districtW17 == 189
replace districtW17 = 10719 if districtW17 == 190
replace districtW17 = 10720 if districtW17 == 191
replace districtW17 = 10721 if districtW17 == 192
replace districtW17 = 10722 if districtW17 == 193
replace districtW17 = 10723 if districtW17 == 194
replace districtW17 = 10724 if districtW17 == 195
replace districtW17 = 10725 if districtW17 == 196
replace districtW17 = 10726 if districtW17 == 197
replace districtW17 = 10727 if districtW17 == 198
replace districtW17 = 10728 if districtW17 == 199
replace districtW17 = 10729 if districtW17 == 200
replace districtW17 = 10730 if districtW17 == 201
replace districtW17 = 10731 if districtW17 == 202
replace districtW17 = 10732 if districtW17 == 203
replace districtW17 = 10733 if districtW17 == 204
replace districtW17 = 10734 if districtW17 == 205
replace districtW17 = 10735 if districtW17 == 206
replace districtW17 = 10736 if districtW17 == 207
replace districtW17 = 10737 if districtW17 == 208
replace districtW17 = 10738 if districtW17 == 209
replace districtW17 = 10739 if districtW17 == 210
replace districtW17 = 10740 if districtW17 == 211
replace districtW17 = 10741 if districtW17 == 212
replace districtW17 = 10742 if districtW17 == 213
replace districtW17 = 10743 if districtW17 == 214
replace districtW17 = 10744 if districtW17 == 215
replace districtW17 = 10745 if districtW17 == 216
replace districtW17 = 10746 if districtW17 == 217
replace districtW17 = 10747 if districtW17 == 218
replace districtW17 = 10748 if districtW17 == 219
replace districtW17 = 10749 if districtW17 == 220
replace districtW17 = 10750 if districtW17 == 221
replace districtW17 = 10751 if districtW17 == 222
replace districtW17 = 10752 if districtW17 == 223
replace districtW17 = 10753 if districtW17 == 224
replace districtW17 = 10754 if districtW17 == 225
replace districtW17 = 10755 if districtW17 == 226
replace districtW17 = 10756 if districtW17 == 227
replace districtW17 = 10757 if districtW17 == 228
replace districtW17 = 10758 if districtW17 == 229
replace districtW17 = 10759 if districtW17 == 230
replace districtW17 = 10760 if districtW17 == 231
replace districtW17 = 10761 if districtW17 == 232
replace districtW17 = 10762 if districtW17 == 233
replace districtW17 = 10763 if districtW17 == 234
replace districtW17 = 10764 if districtW17 == 235
replace districtW17 = 10765 if districtW17 == 236
replace districtW17 = 10766 if districtW17 == 237
replace districtW17 = 10767 if districtW17 == 238
replace districtW17 = 10768 if districtW17 == 239
replace districtW17 = 10769 if districtW17 == 240
replace districtW17 = 10770 if districtW17 == 241
replace districtW17 = 10771 if districtW17 == 242
replace districtW17 = 10772 if districtW17 == 243
replace districtW17 = 10773 if districtW17 == 244
replace districtW17 = 10774 if districtW17 == 245
replace districtW17 = 10775 if districtW17 == 246
replace districtW17 = 10776 if districtW17 == 247
replace districtW17 = 10777 if districtW17 == 248
replace districtW17 = 10778 if districtW17 == 249
replace districtW17 = 10779 if districtW17 == 250
replace districtW17 = 10780 if districtW17 == 251
replace districtW17 = 10781 if districtW17 == 252
replace districtW17 = 10782 if districtW17 == 253
replace districtW17 = 10783 if districtW17 == 254
replace districtW17 = 10784 if districtW17 == 255
replace districtW17 = 10785 if districtW17 == 256
replace districtW17 = 10786 if districtW17 == 257
replace districtW17 = 10787 if districtW17 == 258
replace districtW17 = 10788 if districtW17 == 259
replace districtW17 = 10789 if districtW17 == 260
replace districtW17 = 10790 if districtW17 == 261
replace districtW17 = 10791 if districtW17 == 262
replace districtW17 = 10792 if districtW17 == 263
replace districtW17 = 10793 if districtW17 == 264
replace districtW17 = 10794 if districtW17 == 265
replace districtW17 = 10795 if districtW17 == 266
replace districtW17 = 10796 if districtW17 == 267
replace districtW17 = 10797 if districtW17 == 268
replace districtW17 = 10798 if districtW17 == 269
replace districtW17 = 10799 if districtW17 == 270
replace districtW17 = 10800 if districtW17 == 271
replace districtW17 = 10801 if districtW17 == 272
replace districtW17 = 10802 if districtW17 == 273
replace districtW17 = 10803 if districtW17 == 274
replace districtW17 = 10804 if districtW17 == 275
replace districtW17 = 10805 if districtW17 == 276
replace districtW17 = 10806 if districtW17 == 277
replace districtW17 = 10807 if districtW17 == 278
replace districtW17 = 10808 if districtW17 == 279
replace districtW17 = 10809 if districtW17 == 280
replace districtW17 = 10810 if districtW17 == 281
replace districtW17 = 10811 if districtW17 == 282
replace districtW17 = 10812 if districtW17 == 283
replace districtW17 = 10813 if districtW17 == 284
replace districtW17 = 10814 if districtW17 == 285
replace districtW17 = 10815 if districtW17 == 286
replace districtW17 = 10816 if districtW17 == 287
replace districtW17 = 10817 if districtW17 == 288
replace districtW17 = 10818 if districtW17 == 289
replace districtW17 = 10819 if districtW17 == 290
replace districtW17 = 10820 if districtW17 == 291
replace districtW17 = 10821 if districtW17 == 292
replace districtW17 = 10822 if districtW17 == 293
replace districtW17 = 10823 if districtW17 == 294
replace districtW17 = 10824 if districtW17 == 295
replace districtW17 = 10825 if districtW17 == 296
replace districtW17 = 10826 if districtW17 == 297
replace districtW17 = 10827 if districtW17 == 298
replace districtW17 = 10828 if districtW17 == 299
replace districtW17 = 10829 if districtW17 == 300
replace districtW17 = 10830 if districtW17 == 301
replace districtW17 = 10831 if districtW17 == 302
replace districtW17 = 10832 if districtW17 == 303
replace districtW17 = 10833 if districtW17 == 304
replace districtW17 = 10834 if districtW17 == 305
replace districtW17 = 10835 if districtW17 == 306
replace districtW17 = 10836 if districtW17 == 307
replace districtW17 = 10837 if districtW17 == 308
replace districtW17 = 10838 if districtW17 == 309
replace districtW17 = 10839 if districtW17 == 310
replace districtW17 = 10840 if districtW17 == 311
replace districtW17 = 10841 if districtW17 == 312
replace districtW17 = 10842 if districtW17 == 313
replace districtW17 = 10843 if districtW17 == 314
replace districtW17 = 10844 if districtW17 == 315
replace districtW17 = 10845 if districtW17 == 316
replace districtW17 = 10846 if districtW17 == 317
replace districtW17 = 10847 if districtW17 == 318
replace districtW17 = 10848 if districtW17 == 319
replace districtW17 = 10849 if districtW17 == 320
replace districtW17 = 10850 if districtW17 == 321
replace districtW17 = 10851 if districtW17 == 322
replace districtW17 = 10852 if districtW17 == 323
replace districtW17 = 10853 if districtW17 == 324
replace districtW17 = 10854 if districtW17 == 325
replace districtW17 = 10855 if districtW17 == 326
replace districtW17 = 10856 if districtW17 == 327
replace districtW17 = 10857 if districtW17 == 328
replace districtW17 = 10858 if districtW17 == 329
replace districtW17 = 10859 if districtW17 == 330
replace districtW17 = 10860 if districtW17 == 331
replace districtW17 = 10861 if districtW17 == 332
replace districtW17 = 10862 if districtW17 == 333
replace districtW17 = 10863 if districtW17 == 334
replace districtW17 = 10864 if districtW17 == 335
replace districtW17 = 10865 if districtW17 == 336
replace districtW17 = 10866 if districtW17 == 337
replace districtW17 = 10867 if districtW17 == 338
replace districtW17 = 10868 if districtW17 == 339
replace districtW17 = 10869 if districtW17 == 340
replace districtW17 = 10870 if districtW17 == 341
replace districtW17 = 10871 if districtW17 == 342
replace districtW17 = 10872 if districtW17 == 343
replace districtW17 = 10873 if districtW17 == 344
replace districtW17 = 10874 if districtW17 == 345
replace districtW17 = 10875 if districtW17 == 346
replace districtW17 = 10876 if districtW17 == 347
replace districtW17 = 10877 if districtW17 == 348
replace districtW17 = 10878 if districtW17 == 349
replace districtW17 = 10879 if districtW17 == 350
replace districtW17 = 10880 if districtW17 == 351
replace districtW17 = 10881 if districtW17 == 352
replace districtW17 = 10882 if districtW17 == 353
replace districtW17 = 10883 if districtW17 == 354
replace districtW17 = 10884 if districtW17 == 355
replace districtW17 = 10885 if districtW17 == 356
replace districtW17 = 10886 if districtW17 == 357
replace districtW17 = 10887 if districtW17 == 358
replace districtW17 = 10888 if districtW17 == 359
replace districtW17 = 10889 if districtW17 == 360
replace districtW17 = 10890 if districtW17 == 361
replace districtW17 = 10891 if districtW17 == 362
replace districtW17 = 10892 if districtW17 == 363
replace districtW17 = 10893 if districtW17 == 364
replace districtW17 = 10894 if districtW17 == 365
replace districtW17 = 10895 if districtW17 == 366
replace districtW17 = 10896 if districtW17 == 367
replace districtW17 = 10897 if districtW17 == 368
replace districtW17 = 10898 if districtW17 == 369
replace districtW17 = 10899 if districtW17 == 370
replace districtW17 = 10900 if districtW17 == 371
replace districtW17 = 10901 if districtW17 == 372
replace districtW17 = 10902 if districtW17 == 373
replace districtW17 = 10903 if districtW17 == 374
replace districtW17 = 10904 if districtW17 == 375
replace districtW17 = 10905 if districtW17 == 376
replace districtW17 = 10906 if districtW17 == 377
replace districtW17 = 10907 if districtW17 == 378
replace districtW17 = 10908 if districtW17 == 379
replace districtW17 = 10909 if districtW17 == 380
replace districtW17 = 10910 if districtW17 == 381
replace districtW17 = 10911 if districtW17 == 382
replace districtW17 = 10912 if districtW17 == 383
replace districtW17 = 10913 if districtW17 == 384
replace districtW17 = 10914 if districtW17 == 385
replace districtW17 = 10915 if districtW17 == 386
replace districtW17 = 10916 if districtW17 == 387
replace districtW17 = 10917 if districtW17 == 388
replace districtW17 = 10918 if districtW17 == 389
replace districtW17 = 10919 if districtW17 == 390
replace districtW17 = 10920 if districtW17 == 391
replace districtW17 = 10921 if districtW17 == 392
replace districtW17 = 10922 if districtW17 == 393
replace districtW17 = 10923 if districtW17 == 394
replace districtW17 = 10924 if districtW17 == 395
replace districtW17 = 10925 if districtW17 == 396
replace districtW17 = 10926 if districtW17 == 397
replace districtW17 = 10927 if districtW17 == 398
replace districtW17 = 10928 if districtW17 == 399
replace districtW17 = 10929 if districtW17 == 400
replace districtW17 = 10930 if districtW17 == 401
replace districtW17 = 10931 if districtW17 == 402
replace districtW17 = 10932 if districtW17 == 403
replace districtW17 = 10933 if districtW17 == 404
replace districtW17 = 10934 if districtW17 == 405
replace districtW17 = 10935 if districtW17 == 406
replace districtW17 = 10936 if districtW17 == 407
replace districtW17 = 10937 if districtW17 == 408
replace districtW17 = 10938 if districtW17 == 409
replace districtW17 = 10939 if districtW17 == 410
replace districtW17 = 10940 if districtW17 == 411
replace districtW17 = 10941 if districtW17 == 412
replace districtW17 = 10942 if districtW17 == 413
replace districtW17 = 10943 if districtW17 == 414
replace districtW17 = 10944 if districtW17 == 415
replace districtW17 = 10945 if districtW17 == 416
replace districtW17 = 10946 if districtW17 == 417
replace districtW17 = 10947 if districtW17 == 418
replace districtW17 = 10948 if districtW17 == 419
replace districtW17 = 10949 if districtW17 == 420
replace districtW17 = 10950 if districtW17 == 421
replace districtW17 = 10951 if districtW17 == 422
replace districtW17 = 10952 if districtW17 == 423
replace districtW17 = 10953 if districtW17 == 424
replace districtW17 = 10954 if districtW17 == 425
replace districtW17 = 10955 if districtW17 == 426
replace districtW17 = 10956 if districtW17 == 427
replace districtW17 = 10957 if districtW17 == 428
replace districtW17 = 10958 if districtW17 == 429
replace districtW17 = 10959 if districtW17 == 430
replace districtW17 = 10960 if districtW17 == 431
replace districtW17 = 10961 if districtW17 == 432
replace districtW17 = 10962 if districtW17 == 433
replace districtW17 = 10963 if districtW17 == 434
replace districtW17 = 10964 if districtW17 == 435
replace districtW17 = 10965 if districtW17 == 436
replace districtW17 = 10966 if districtW17 == 437
replace districtW17 = 10967 if districtW17 == 438
replace districtW17 = 10968 if districtW17 == 439
replace districtW17 = 10969 if districtW17 == 440
replace districtW17 = 10970 if districtW17 == 441
replace districtW17 = 10971 if districtW17 == 442
replace districtW17 = 10972 if districtW17 == 443
replace districtW17 = 10973 if districtW17 == 444
replace districtW17 = 10974 if districtW17 == 445
replace districtW17 = 10975 if districtW17 == 446
replace districtW17 = 10976 if districtW17 == 447
replace districtW17 = 10977 if districtW17 == 448
replace districtW17 = 10978 if districtW17 == 449
replace districtW17 = 10979 if districtW17 == 450
replace districtW17 = 10980 if districtW17 == 451
replace districtW17 = 10981 if districtW17 == 452
replace districtW17 = 10982 if districtW17 == 453
replace districtW17 = 10983 if districtW17 == 454
replace districtW17 = 10984 if districtW17 == 455
replace districtW17 = 10985 if districtW17 == 456
replace districtW17 = 10986 if districtW17 == 457
replace districtW17 = 10987 if districtW17 == 458
replace districtW17 = 10988 if districtW17 == 459
replace districtW17 = 10989 if districtW17 == 460
replace districtW17 = 10990 if districtW17 == 461
replace districtW17 = 10991 if districtW17 == 462
replace districtW17 = 10992 if districtW17 == 463
replace districtW17 = 10993 if districtW17 == 464
replace districtW17 = 10994 if districtW17 == 465
replace districtW17 = 10995 if districtW17 == 466
replace districtW17 = 10996 if districtW17 == 467
replace districtW17 = 10997 if districtW17 == 468
replace districtW17 = 10998 if districtW17 == 469
replace districtW17 = 10999 if districtW17 == 470
replace districtW17 = 11000 if districtW17 == 471
replace districtW17 = 11001 if districtW17 == 472
replace districtW17 = 11002 if districtW17 == 473
replace districtW17 = 11003 if districtW17 == 474
replace districtW17 = 11004 if districtW17 == 475
replace districtW17 = 11005 if districtW17 == 476
replace districtW17 = 11006 if districtW17 == 477
replace districtW17 = 11007 if districtW17 == 478
replace districtW17 = 11008 if districtW17 == 479
replace districtW17 = 11009 if districtW17 == 480
replace districtW17 = 11010 if districtW17 == 481
replace districtW17 = 11011 if districtW17 == 482
replace districtW17 = 11012 if districtW17 == 483
replace districtW17 = 11013 if districtW17 == 484
replace districtW17 = 11014 if districtW17 == 485
replace districtW17 = 11015 if districtW17 == 486
replace districtW17 = 11016 if districtW17 == 487
replace districtW17 = 11017 if districtW17 == 488
replace districtW17 = 11018 if districtW17 == 489
replace districtW17 = 11019 if districtW17 == 490
replace districtW17 = 11020 if districtW17 == 491
replace districtW17 = 11021 if districtW17 == 492
replace districtW17 = 11022 if districtW17 == 493
replace districtW17 = 11023 if districtW17 == 494
replace districtW17 = 11024 if districtW17 == 495
replace districtW17 = 11025 if districtW17 == 496
replace districtW17 = 11026 if districtW17 == 497
replace districtW17 = 11027 if districtW17 == 498
replace districtW17 = 11028 if districtW17 == 499
replace districtW17 = 11029 if districtW17 == 500
replace districtW17 = 11030 if districtW17 == 501
replace districtW17 = 11031 if districtW17 == 502
replace districtW17 = 11032 if districtW17 == 503
replace districtW17 = 11033 if districtW17 == 504
replace districtW17 = 11034 if districtW17 == 505
replace districtW17 = 11035 if districtW17 == 506
replace districtW17 = 11036 if districtW17 == 507
replace districtW17 = 11037 if districtW17 == 508
replace districtW17 = 11038 if districtW17 == 509
replace districtW17 = 11039 if districtW17 == 510
replace districtW17 = 11040 if districtW17 == 511
replace districtW17 = 11041 if districtW17 == 512
replace districtW17 = 11042 if districtW17 == 513
replace districtW17 = 11043 if districtW17 == 514
replace districtW17 = 11044 if districtW17 == 515
replace districtW17 = 11045 if districtW17 == 516
replace districtW17 = 11046 if districtW17 == 517
replace districtW17 = 11047 if districtW17 == 518
replace districtW17 = 11048 if districtW17 == 519
replace districtW17 = 11049 if districtW17 == 520
replace districtW17 = 11050 if districtW17 == 521
replace districtW17 = 11051 if districtW17 == 522
replace districtW17 = 11052 if districtW17 == 523
replace districtW17 = 11053 if districtW17 == 524
replace districtW17 = 11054 if districtW17 == 525
replace districtW17 = 11055 if districtW17 == 526
replace districtW17 = 11056 if districtW17 == 527
replace districtW17 = 11057 if districtW17 == 528
replace districtW17 = 11058 if districtW17 == 529
replace districtW17 = 11059 if districtW17 == 530
replace districtW17 = 11060 if districtW17 == 531
replace districtW17 = 11061 if districtW17 == 532
replace districtW17 = 11062 if districtW17 == 533
replace districtW17 = 30041 if districtW17 == 534
replace districtW17 = 30042 if districtW17 == 535
replace districtW17 = 30043 if districtW17 == 536
replace districtW17 = 30044 if districtW17 == 537
replace districtW17 = 30045 if districtW17 == 538
replace districtW17 = 30046 if districtW17 == 539
replace districtW17 = 30047 if districtW17 == 540
replace districtW17 = 30048 if districtW17 == 541
replace districtW17 = 30049 if districtW17 == 542
replace districtW17 = 30050 if districtW17 == 543
replace districtW17 = 30051 if districtW17 == 544
replace districtW17 = 30052 if districtW17 == 545
replace districtW17 = 30053 if districtW17 == 546
replace districtW17 = 30054 if districtW17 == 547
replace districtW17 = 30055 if districtW17 == 548
replace districtW17 = 30056 if districtW17 == 549
replace districtW17 = 30057 if districtW17 == 550
replace districtW17 = 30058 if districtW17 == 551
replace districtW17 = 30059 if districtW17 == 552
replace districtW17 = 30060 if districtW17 == 553
replace districtW17 = 30061 if districtW17 == 554
replace districtW17 = 30062 if districtW17 == 555
replace districtW17 = 30063 if districtW17 == 556
replace districtW17 = 30064 if districtW17 == 557
replace districtW17 = 30065 if districtW17 == 558
replace districtW17 = 30066 if districtW17 == 559
replace districtW17 = 30067 if districtW17 == 560
replace districtW17 = 30068 if districtW17 == 561
replace districtW17 = 30069 if districtW17 == 562
replace districtW17 = 30070 if districtW17 == 563
replace districtW17 = 30071 if districtW17 == 564
replace districtW17 = 30072 if districtW17 == 565
replace districtW17 = 30073 if districtW17 == 566
replace districtW17 = 30074 if districtW17 == 567
replace districtW17 = 30075 if districtW17 == 568
replace districtW17 = 30076 if districtW17 == 569
replace districtW17 = 30077 if districtW17 == 570
replace districtW17 = 30078 if districtW17 == 571
replace districtW17 = 30079 if districtW17 == 572
replace districtW17 = 30080 if districtW17 == 573
replace districtW17 = 20001 if districtW17 == 574
replace districtW17 = 20002 if districtW17 == 575
replace districtW17 = 20003 if districtW17 == 576
replace districtW17 = 20004 if districtW17 == 577
replace districtW17 = 20005 if districtW17 == 578
replace districtW17 = 20006 if districtW17 == 579
replace districtW17 = 20007 if districtW17 == 580
replace districtW17 = 20008 if districtW17 == 581
replace districtW17 = 20009 if districtW17 == 582
replace districtW17 = 20010 if districtW17 == 583
replace districtW17 = 20011 if districtW17 == 584
replace districtW17 = 20012 if districtW17 == 585
replace districtW17 = 20013 if districtW17 == 586
replace districtW17 = 20014 if districtW17 == 587
replace districtW17 = 20015 if districtW17 == 588
replace districtW17 = 20016 if districtW17 == 589
replace districtW17 = 20017 if districtW17 == 590
replace districtW17 = 20018 if districtW17 == 591
replace districtW17 = 20019 if districtW17 == 592
replace districtW17 = 20020 if districtW17 == 593
replace districtW17 = 20021 if districtW17 == 594
replace districtW17 = 20022 if districtW17 == 595
replace districtW17 = 20023 if districtW17 == 596
replace districtW17 = 20024 if districtW17 == 597
replace districtW17 = 20025 if districtW17 == 598
replace districtW17 = 20026 if districtW17 == 599
replace districtW17 = 20028 if districtW17 == 600
replace districtW17 = 20029 if districtW17 == 601
replace districtW17 = 20030 if districtW17 == 602
replace districtW17 = 20031 if districtW17 == 603
replace districtW17 = 20032 if districtW17 == 604
replace districtW17 = 20033 if districtW17 == 605
replace districtW17 = 20034 if districtW17 == 606
replace districtW17 = 20035 if districtW17 == 607
replace districtW17 = 20036 if districtW17 == 608
replace districtW17 = 20037 if districtW17 == 609
replace districtW17 = 20038 if districtW17 == 610
replace districtW17 = 20039 if districtW17 == 611
replace districtW17 = 20040 if districtW17 == 612
replace districtW17 = 20041 if districtW17 == 613
replace districtW17 = 20042 if districtW17 == 614
replace districtW17 = 20043 if districtW17 == 615
replace districtW17 = 20044 if districtW17 == 616
replace districtW17 = 20045 if districtW17 == 617
replace districtW17 = 20046 if districtW17 == 618
replace districtW17 = 20047 if districtW17 == 619
replace districtW17 = 20027 if districtW17 == 620
replace districtW17 = 20048 if districtW17 == 621
replace districtW17 = 20049 if districtW17 == 622
replace districtW17 = 20050 if districtW17 == 623
replace districtW17 = 20051 if districtW17 == 624
replace districtW17 = 20052 if districtW17 == 625
replace districtW17 = 20053 if districtW17 == 626
replace districtW17 = 20054 if districtW17 == 627
replace districtW17 = 20055 if districtW17 == 628
replace districtW17 = 20056 if districtW17 == 629
replace districtW17 = 20057 if districtW17 == 630
replace districtW17 = 20058 if districtW17 == 631
replace districtW17 = 20059 if districtW17 == 632
replace districtW17 = 40001 if districtW17 == 701
replace districtW17 = 40002 if districtW17 == 702
replace districtW17 = 40003 if districtW17 == 703
replace districtW17 = 40004 if districtW17 == 704
replace districtW17 = 40005 if districtW17 == 705
replace districtW17 = 40006 if districtW17 == 706
replace districtW17 = 40007 if districtW17 == 707
replace districtW17 = 40008 if districtW17 == 708
replace districtW17 = 40009 if districtW17 == 709
replace districtW17 = 40010 if districtW17 == 710
replace districtW17 = 40011 if districtW17 == 711
replace districtW17 = 40012 if districtW17 == 712
replace districtW17 = 40013 if districtW17 == 713
replace districtW17 = 40014 if districtW17 == 714
replace districtW17 = 40015 if districtW17 == 715
replace districtW17 = 40016 if districtW17 == 716
replace districtW17 = 40017 if districtW17 == 717
replace districtW17 = 40018 if districtW17 == 718

* Replace constituency IDs (wave 18) - Assuming R's wave 18 constituency is the same as R's wave 19 constituency

gen districtW18 = pconW19

replace districtW18 = 10530 if districtW18 == 1
replace districtW18 = 10531 if districtW18 == 2
replace districtW18 = 10532 if districtW18 == 3
replace districtW18 = 10533 if districtW18 == 4
replace districtW18 = 10534 if districtW18 == 5
replace districtW18 = 10535 if districtW18 == 6
replace districtW18 = 10536 if districtW18 == 7
replace districtW18 = 10537 if districtW18 == 8
replace districtW18 = 10538 if districtW18 == 9
replace districtW18 = 10539 if districtW18 == 10
replace districtW18 = 10540 if districtW18 == 11
replace districtW18 = 10541 if districtW18 == 12
replace districtW18 = 10542 if districtW18 == 13
replace districtW18 = 10543 if districtW18 == 14
replace districtW18 = 10544 if districtW18 == 15
replace districtW18 = 10545 if districtW18 == 16
replace districtW18 = 10546 if districtW18 == 17
replace districtW18 = 10547 if districtW18 == 18
replace districtW18 = 10548 if districtW18 == 19
replace districtW18 = 10549 if districtW18 == 20
replace districtW18 = 10550 if districtW18 == 21
replace districtW18 = 10551 if districtW18 == 22
replace districtW18 = 10552 if districtW18 == 23
replace districtW18 = 10553 if districtW18 == 24
replace districtW18 = 10554 if districtW18 == 25
replace districtW18 = 10555 if districtW18 == 26
replace districtW18 = 10556 if districtW18 == 27
replace districtW18 = 10557 if districtW18 == 28
replace districtW18 = 10558 if districtW18 == 29
replace districtW18 = 10559 if districtW18 == 30
replace districtW18 = 10560 if districtW18 == 31
replace districtW18 = 10561 if districtW18 == 32
replace districtW18 = 10562 if districtW18 == 33
replace districtW18 = 10563 if districtW18 == 34
replace districtW18 = 10564 if districtW18 == 35
replace districtW18 = 10565 if districtW18 == 36
replace districtW18 = 10566 if districtW18 == 37
replace districtW18 = 10567 if districtW18 == 38
replace districtW18 = 10568 if districtW18 == 39
replace districtW18 = 10569 if districtW18 == 40
replace districtW18 = 10570 if districtW18 == 41
replace districtW18 = 10571 if districtW18 == 42
replace districtW18 = 10572 if districtW18 == 43
replace districtW18 = 10573 if districtW18 == 44
replace districtW18 = 10574 if districtW18 == 45
replace districtW18 = 10575 if districtW18 == 46
replace districtW18 = 10576 if districtW18 == 47
replace districtW18 = 10577 if districtW18 == 48
replace districtW18 = 10578 if districtW18 == 49
replace districtW18 = 10579 if districtW18 == 50
replace districtW18 = 10580 if districtW18 == 51
replace districtW18 = 10581 if districtW18 == 52
replace districtW18 = 10582 if districtW18 == 53
replace districtW18 = 10583 if districtW18 == 54
replace districtW18 = 10584 if districtW18 == 55
replace districtW18 = 10585 if districtW18 == 56
replace districtW18 = 10586 if districtW18 == 57
replace districtW18 = 10587 if districtW18 == 58
replace districtW18 = 10588 if districtW18 == 59
replace districtW18 = 10589 if districtW18 == 60
replace districtW18 = 10590 if districtW18 == 61
replace districtW18 = 10591 if districtW18 == 62
replace districtW18 = 10592 if districtW18 == 63
replace districtW18 = 10593 if districtW18 == 64
replace districtW18 = 10594 if districtW18 == 65
replace districtW18 = 10595 if districtW18 == 66
replace districtW18 = 10596 if districtW18 == 67
replace districtW18 = 10597 if districtW18 == 68
replace districtW18 = 10598 if districtW18 == 69
replace districtW18 = 10599 if districtW18 == 70
replace districtW18 = 10600 if districtW18 == 71
replace districtW18 = 10601 if districtW18 == 72
replace districtW18 = 10602 if districtW18 == 73
replace districtW18 = 10603 if districtW18 == 74
replace districtW18 = 10604 if districtW18 == 75
replace districtW18 = 10605 if districtW18 == 76
replace districtW18 = 10606 if districtW18 == 77
replace districtW18 = 10607 if districtW18 == 78
replace districtW18 = 10608 if districtW18 == 79
replace districtW18 = 10609 if districtW18 == 80
replace districtW18 = 10610 if districtW18 == 81
replace districtW18 = 10611 if districtW18 == 82
replace districtW18 = 10612 if districtW18 == 83
replace districtW18 = 10613 if districtW18 == 84
replace districtW18 = 10614 if districtW18 == 85
replace districtW18 = 10615 if districtW18 == 86
replace districtW18 = 10616 if districtW18 == 87
replace districtW18 = 10617 if districtW18 == 88
replace districtW18 = 10618 if districtW18 == 89
replace districtW18 = 10619 if districtW18 == 90
replace districtW18 = 10620 if districtW18 == 91
replace districtW18 = 10621 if districtW18 == 92
replace districtW18 = 10622 if districtW18 == 93
replace districtW18 = 10623 if districtW18 == 94
replace districtW18 = 10624 if districtW18 == 95
replace districtW18 = 10625 if districtW18 == 96
replace districtW18 = 10626 if districtW18 == 97
replace districtW18 = 10627 if districtW18 == 98
replace districtW18 = 10628 if districtW18 == 99
replace districtW18 = 10629 if districtW18 == 100
replace districtW18 = 10630 if districtW18 == 101
replace districtW18 = 10631 if districtW18 == 102
replace districtW18 = 10632 if districtW18 == 103
replace districtW18 = 10633 if districtW18 == 104
replace districtW18 = 10634 if districtW18 == 105
replace districtW18 = 10635 if districtW18 == 106
replace districtW18 = 10636 if districtW18 == 107
replace districtW18 = 10637 if districtW18 == 108
replace districtW18 = 10638 if districtW18 == 109
replace districtW18 = 10639 if districtW18 == 110
replace districtW18 = 10640 if districtW18 == 111
replace districtW18 = 10641 if districtW18 == 112
replace districtW18 = 10642 if districtW18 == 113
replace districtW18 = 10643 if districtW18 == 114
replace districtW18 = 10644 if districtW18 == 115
replace districtW18 = 10645 if districtW18 == 116
replace districtW18 = 10646 if districtW18 == 117
replace districtW18 = 10647 if districtW18 == 118
replace districtW18 = 10648 if districtW18 == 119
replace districtW18 = 10649 if districtW18 == 120
replace districtW18 = 10650 if districtW18 == 121
replace districtW18 = 10651 if districtW18 == 122
replace districtW18 = 10652 if districtW18 == 123
replace districtW18 = 10653 if districtW18 == 124
replace districtW18 = 10654 if districtW18 == 125
replace districtW18 = 10655 if districtW18 == 126
replace districtW18 = 10656 if districtW18 == 127
replace districtW18 = 10657 if districtW18 == 128
replace districtW18 = 10658 if districtW18 == 129
replace districtW18 = 10659 if districtW18 == 130
replace districtW18 = 10660 if districtW18 == 131
replace districtW18 = 10661 if districtW18 == 132
replace districtW18 = 10662 if districtW18 == 133
replace districtW18 = 10663 if districtW18 == 134
replace districtW18 = 10664 if districtW18 == 135
replace districtW18 = 10665 if districtW18 == 136
replace districtW18 = 10666 if districtW18 == 137
replace districtW18 = 10667 if districtW18 == 138
replace districtW18 = 10668 if districtW18 == 139
replace districtW18 = 10669 if districtW18 == 140
replace districtW18 = 10670 if districtW18 == 141
replace districtW18 = 10671 if districtW18 == 142
replace districtW18 = 10672 if districtW18 == 143
replace districtW18 = 10673 if districtW18 == 144
replace districtW18 = 10674 if districtW18 == 145
replace districtW18 = 10675 if districtW18 == 146
replace districtW18 = 10676 if districtW18 == 147
replace districtW18 = 10677 if districtW18 == 148
replace districtW18 = 10678 if districtW18 == 149
replace districtW18 = 10679 if districtW18 == 150
replace districtW18 = 10680 if districtW18 == 151
replace districtW18 = 10681 if districtW18 == 152
replace districtW18 = 10682 if districtW18 == 153
replace districtW18 = 10683 if districtW18 == 154
replace districtW18 = 10684 if districtW18 == 155
replace districtW18 = 10685 if districtW18 == 156
replace districtW18 = 10686 if districtW18 == 157
replace districtW18 = 10687 if districtW18 == 158
replace districtW18 = 10688 if districtW18 == 159
replace districtW18 = 10689 if districtW18 == 160
replace districtW18 = 10690 if districtW18 == 161
replace districtW18 = 10691 if districtW18 == 162
replace districtW18 = 10692 if districtW18 == 163
replace districtW18 = 10693 if districtW18 == 164
replace districtW18 = 10694 if districtW18 == 165
replace districtW18 = 10695 if districtW18 == 166
replace districtW18 = 10696 if districtW18 == 167
replace districtW18 = 10697 if districtW18 == 168
replace districtW18 = 10698 if districtW18 == 169
replace districtW18 = 10699 if districtW18 == 170
replace districtW18 = 10700 if districtW18 == 171
replace districtW18 = 10701 if districtW18 == 172
replace districtW18 = 10702 if districtW18 == 173
replace districtW18 = 10703 if districtW18 == 174
replace districtW18 = 10704 if districtW18 == 175
replace districtW18 = 10705 if districtW18 == 176
replace districtW18 = 10706 if districtW18 == 177
replace districtW18 = 10707 if districtW18 == 178
replace districtW18 = 10708 if districtW18 == 179
replace districtW18 = 10709 if districtW18 == 180
replace districtW18 = 10710 if districtW18 == 181
replace districtW18 = 10711 if districtW18 == 182
replace districtW18 = 10712 if districtW18 == 183
replace districtW18 = 10713 if districtW18 == 184
replace districtW18 = 10714 if districtW18 == 185
replace districtW18 = 10715 if districtW18 == 186
replace districtW18 = 10716 if districtW18 == 187
replace districtW18 = 10717 if districtW18 == 188
replace districtW18 = 10718 if districtW18 == 189
replace districtW18 = 10719 if districtW18 == 190
replace districtW18 = 10720 if districtW18 == 191
replace districtW18 = 10721 if districtW18 == 192
replace districtW18 = 10722 if districtW18 == 193
replace districtW18 = 10723 if districtW18 == 194
replace districtW18 = 10724 if districtW18 == 195
replace districtW18 = 10725 if districtW18 == 196
replace districtW18 = 10726 if districtW18 == 197
replace districtW18 = 10727 if districtW18 == 198
replace districtW18 = 10728 if districtW18 == 199
replace districtW18 = 10729 if districtW18 == 200
replace districtW18 = 10730 if districtW18 == 201
replace districtW18 = 10731 if districtW18 == 202
replace districtW18 = 10732 if districtW18 == 203
replace districtW18 = 10733 if districtW18 == 204
replace districtW18 = 10734 if districtW18 == 205
replace districtW18 = 10735 if districtW18 == 206
replace districtW18 = 10736 if districtW18 == 207
replace districtW18 = 10737 if districtW18 == 208
replace districtW18 = 10738 if districtW18 == 209
replace districtW18 = 10739 if districtW18 == 210
replace districtW18 = 10740 if districtW18 == 211
replace districtW18 = 10741 if districtW18 == 212
replace districtW18 = 10742 if districtW18 == 213
replace districtW18 = 10743 if districtW18 == 214
replace districtW18 = 10744 if districtW18 == 215
replace districtW18 = 10745 if districtW18 == 216
replace districtW18 = 10746 if districtW18 == 217
replace districtW18 = 10747 if districtW18 == 218
replace districtW18 = 10748 if districtW18 == 219
replace districtW18 = 10749 if districtW18 == 220
replace districtW18 = 10750 if districtW18 == 221
replace districtW18 = 10751 if districtW18 == 222
replace districtW18 = 10752 if districtW18 == 223
replace districtW18 = 10753 if districtW18 == 224
replace districtW18 = 10754 if districtW18 == 225
replace districtW18 = 10755 if districtW18 == 226
replace districtW18 = 10756 if districtW18 == 227
replace districtW18 = 10757 if districtW18 == 228
replace districtW18 = 10758 if districtW18 == 229
replace districtW18 = 10759 if districtW18 == 230
replace districtW18 = 10760 if districtW18 == 231
replace districtW18 = 10761 if districtW18 == 232
replace districtW18 = 10762 if districtW18 == 233
replace districtW18 = 10763 if districtW18 == 234
replace districtW18 = 10764 if districtW18 == 235
replace districtW18 = 10765 if districtW18 == 236
replace districtW18 = 10766 if districtW18 == 237
replace districtW18 = 10767 if districtW18 == 238
replace districtW18 = 10768 if districtW18 == 239
replace districtW18 = 10769 if districtW18 == 240
replace districtW18 = 10770 if districtW18 == 241
replace districtW18 = 10771 if districtW18 == 242
replace districtW18 = 10772 if districtW18 == 243
replace districtW18 = 10773 if districtW18 == 244
replace districtW18 = 10774 if districtW18 == 245
replace districtW18 = 10775 if districtW18 == 246
replace districtW18 = 10776 if districtW18 == 247
replace districtW18 = 10777 if districtW18 == 248
replace districtW18 = 10778 if districtW18 == 249
replace districtW18 = 10779 if districtW18 == 250
replace districtW18 = 10780 if districtW18 == 251
replace districtW18 = 10781 if districtW18 == 252
replace districtW18 = 10782 if districtW18 == 253
replace districtW18 = 10783 if districtW18 == 254
replace districtW18 = 10784 if districtW18 == 255
replace districtW18 = 10785 if districtW18 == 256
replace districtW18 = 10786 if districtW18 == 257
replace districtW18 = 10787 if districtW18 == 258
replace districtW18 = 10788 if districtW18 == 259
replace districtW18 = 10789 if districtW18 == 260
replace districtW18 = 10790 if districtW18 == 261
replace districtW18 = 10791 if districtW18 == 262
replace districtW18 = 10792 if districtW18 == 263
replace districtW18 = 10793 if districtW18 == 264
replace districtW18 = 10794 if districtW18 == 265
replace districtW18 = 10795 if districtW18 == 266
replace districtW18 = 10796 if districtW18 == 267
replace districtW18 = 10797 if districtW18 == 268
replace districtW18 = 10798 if districtW18 == 269
replace districtW18 = 10799 if districtW18 == 270
replace districtW18 = 10800 if districtW18 == 271
replace districtW18 = 10801 if districtW18 == 272
replace districtW18 = 10802 if districtW18 == 273
replace districtW18 = 10803 if districtW18 == 274
replace districtW18 = 10804 if districtW18 == 275
replace districtW18 = 10805 if districtW18 == 276
replace districtW18 = 10806 if districtW18 == 277
replace districtW18 = 10807 if districtW18 == 278
replace districtW18 = 10808 if districtW18 == 279
replace districtW18 = 10809 if districtW18 == 280
replace districtW18 = 10810 if districtW18 == 281
replace districtW18 = 10811 if districtW18 == 282
replace districtW18 = 10812 if districtW18 == 283
replace districtW18 = 10813 if districtW18 == 284
replace districtW18 = 10814 if districtW18 == 285
replace districtW18 = 10815 if districtW18 == 286
replace districtW18 = 10816 if districtW18 == 287
replace districtW18 = 10817 if districtW18 == 288
replace districtW18 = 10818 if districtW18 == 289
replace districtW18 = 10819 if districtW18 == 290
replace districtW18 = 10820 if districtW18 == 291
replace districtW18 = 10821 if districtW18 == 292
replace districtW18 = 10822 if districtW18 == 293
replace districtW18 = 10823 if districtW18 == 294
replace districtW18 = 10824 if districtW18 == 295
replace districtW18 = 10825 if districtW18 == 296
replace districtW18 = 10826 if districtW18 == 297
replace districtW18 = 10827 if districtW18 == 298
replace districtW18 = 10828 if districtW18 == 299
replace districtW18 = 10829 if districtW18 == 300
replace districtW18 = 10830 if districtW18 == 301
replace districtW18 = 10831 if districtW18 == 302
replace districtW18 = 10832 if districtW18 == 303
replace districtW18 = 10833 if districtW18 == 304
replace districtW18 = 10834 if districtW18 == 305
replace districtW18 = 10835 if districtW18 == 306
replace districtW18 = 10836 if districtW18 == 307
replace districtW18 = 10837 if districtW18 == 308
replace districtW18 = 10838 if districtW18 == 309
replace districtW18 = 10839 if districtW18 == 310
replace districtW18 = 10840 if districtW18 == 311
replace districtW18 = 10841 if districtW18 == 312
replace districtW18 = 10842 if districtW18 == 313
replace districtW18 = 10843 if districtW18 == 314
replace districtW18 = 10844 if districtW18 == 315
replace districtW18 = 10845 if districtW18 == 316
replace districtW18 = 10846 if districtW18 == 317
replace districtW18 = 10847 if districtW18 == 318
replace districtW18 = 10848 if districtW18 == 319
replace districtW18 = 10849 if districtW18 == 320
replace districtW18 = 10850 if districtW18 == 321
replace districtW18 = 10851 if districtW18 == 322
replace districtW18 = 10852 if districtW18 == 323
replace districtW18 = 10853 if districtW18 == 324
replace districtW18 = 10854 if districtW18 == 325
replace districtW18 = 10855 if districtW18 == 326
replace districtW18 = 10856 if districtW18 == 327
replace districtW18 = 10857 if districtW18 == 328
replace districtW18 = 10858 if districtW18 == 329
replace districtW18 = 10859 if districtW18 == 330
replace districtW18 = 10860 if districtW18 == 331
replace districtW18 = 10861 if districtW18 == 332
replace districtW18 = 10862 if districtW18 == 333
replace districtW18 = 10863 if districtW18 == 334
replace districtW18 = 10864 if districtW18 == 335
replace districtW18 = 10865 if districtW18 == 336
replace districtW18 = 10866 if districtW18 == 337
replace districtW18 = 10867 if districtW18 == 338
replace districtW18 = 10868 if districtW18 == 339
replace districtW18 = 10869 if districtW18 == 340
replace districtW18 = 10870 if districtW18 == 341
replace districtW18 = 10871 if districtW18 == 342
replace districtW18 = 10872 if districtW18 == 343
replace districtW18 = 10873 if districtW18 == 344
replace districtW18 = 10874 if districtW18 == 345
replace districtW18 = 10875 if districtW18 == 346
replace districtW18 = 10876 if districtW18 == 347
replace districtW18 = 10877 if districtW18 == 348
replace districtW18 = 10878 if districtW18 == 349
replace districtW18 = 10879 if districtW18 == 350
replace districtW18 = 10880 if districtW18 == 351
replace districtW18 = 10881 if districtW18 == 352
replace districtW18 = 10882 if districtW18 == 353
replace districtW18 = 10883 if districtW18 == 354
replace districtW18 = 10884 if districtW18 == 355
replace districtW18 = 10885 if districtW18 == 356
replace districtW18 = 10886 if districtW18 == 357
replace districtW18 = 10887 if districtW18 == 358
replace districtW18 = 10888 if districtW18 == 359
replace districtW18 = 10889 if districtW18 == 360
replace districtW18 = 10890 if districtW18 == 361
replace districtW18 = 10891 if districtW18 == 362
replace districtW18 = 10892 if districtW18 == 363
replace districtW18 = 10893 if districtW18 == 364
replace districtW18 = 10894 if districtW18 == 365
replace districtW18 = 10895 if districtW18 == 366
replace districtW18 = 10896 if districtW18 == 367
replace districtW18 = 10897 if districtW18 == 368
replace districtW18 = 10898 if districtW18 == 369
replace districtW18 = 10899 if districtW18 == 370
replace districtW18 = 10900 if districtW18 == 371
replace districtW18 = 10901 if districtW18 == 372
replace districtW18 = 10902 if districtW18 == 373
replace districtW18 = 10903 if districtW18 == 374
replace districtW18 = 10904 if districtW18 == 375
replace districtW18 = 10905 if districtW18 == 376
replace districtW18 = 10906 if districtW18 == 377
replace districtW18 = 10907 if districtW18 == 378
replace districtW18 = 10908 if districtW18 == 379
replace districtW18 = 10909 if districtW18 == 380
replace districtW18 = 10910 if districtW18 == 381
replace districtW18 = 10911 if districtW18 == 382
replace districtW18 = 10912 if districtW18 == 383
replace districtW18 = 10913 if districtW18 == 384
replace districtW18 = 10914 if districtW18 == 385
replace districtW18 = 10915 if districtW18 == 386
replace districtW18 = 10916 if districtW18 == 387
replace districtW18 = 10917 if districtW18 == 388
replace districtW18 = 10918 if districtW18 == 389
replace districtW18 = 10919 if districtW18 == 390
replace districtW18 = 10920 if districtW18 == 391
replace districtW18 = 10921 if districtW18 == 392
replace districtW18 = 10922 if districtW18 == 393
replace districtW18 = 10923 if districtW18 == 394
replace districtW18 = 10924 if districtW18 == 395
replace districtW18 = 10925 if districtW18 == 396
replace districtW18 = 10926 if districtW18 == 397
replace districtW18 = 10927 if districtW18 == 398
replace districtW18 = 10928 if districtW18 == 399
replace districtW18 = 10929 if districtW18 == 400
replace districtW18 = 10930 if districtW18 == 401
replace districtW18 = 10931 if districtW18 == 402
replace districtW18 = 10932 if districtW18 == 403
replace districtW18 = 10933 if districtW18 == 404
replace districtW18 = 10934 if districtW18 == 405
replace districtW18 = 10935 if districtW18 == 406
replace districtW18 = 10936 if districtW18 == 407
replace districtW18 = 10937 if districtW18 == 408
replace districtW18 = 10938 if districtW18 == 409
replace districtW18 = 10939 if districtW18 == 410
replace districtW18 = 10940 if districtW18 == 411
replace districtW18 = 10941 if districtW18 == 412
replace districtW18 = 10942 if districtW18 == 413
replace districtW18 = 10943 if districtW18 == 414
replace districtW18 = 10944 if districtW18 == 415
replace districtW18 = 10945 if districtW18 == 416
replace districtW18 = 10946 if districtW18 == 417
replace districtW18 = 10947 if districtW18 == 418
replace districtW18 = 10948 if districtW18 == 419
replace districtW18 = 10949 if districtW18 == 420
replace districtW18 = 10950 if districtW18 == 421
replace districtW18 = 10951 if districtW18 == 422
replace districtW18 = 10952 if districtW18 == 423
replace districtW18 = 10953 if districtW18 == 424
replace districtW18 = 10954 if districtW18 == 425
replace districtW18 = 10955 if districtW18 == 426
replace districtW18 = 10956 if districtW18 == 427
replace districtW18 = 10957 if districtW18 == 428
replace districtW18 = 10958 if districtW18 == 429
replace districtW18 = 10959 if districtW18 == 430
replace districtW18 = 10960 if districtW18 == 431
replace districtW18 = 10961 if districtW18 == 432
replace districtW18 = 10962 if districtW18 == 433
replace districtW18 = 10963 if districtW18 == 434
replace districtW18 = 10964 if districtW18 == 435
replace districtW18 = 10965 if districtW18 == 436
replace districtW18 = 10966 if districtW18 == 437
replace districtW18 = 10967 if districtW18 == 438
replace districtW18 = 10968 if districtW18 == 439
replace districtW18 = 10969 if districtW18 == 440
replace districtW18 = 10970 if districtW18 == 441
replace districtW18 = 10971 if districtW18 == 442
replace districtW18 = 10972 if districtW18 == 443
replace districtW18 = 10973 if districtW18 == 444
replace districtW18 = 10974 if districtW18 == 445
replace districtW18 = 10975 if districtW18 == 446
replace districtW18 = 10976 if districtW18 == 447
replace districtW18 = 10977 if districtW18 == 448
replace districtW18 = 10978 if districtW18 == 449
replace districtW18 = 10979 if districtW18 == 450
replace districtW18 = 10980 if districtW18 == 451
replace districtW18 = 10981 if districtW18 == 452
replace districtW18 = 10982 if districtW18 == 453
replace districtW18 = 10983 if districtW18 == 454
replace districtW18 = 10984 if districtW18 == 455
replace districtW18 = 10985 if districtW18 == 456
replace districtW18 = 10986 if districtW18 == 457
replace districtW18 = 10987 if districtW18 == 458
replace districtW18 = 10988 if districtW18 == 459
replace districtW18 = 10989 if districtW18 == 460
replace districtW18 = 10990 if districtW18 == 461
replace districtW18 = 10991 if districtW18 == 462
replace districtW18 = 10992 if districtW18 == 463
replace districtW18 = 10993 if districtW18 == 464
replace districtW18 = 10994 if districtW18 == 465
replace districtW18 = 10995 if districtW18 == 466
replace districtW18 = 10996 if districtW18 == 467
replace districtW18 = 10997 if districtW18 == 468
replace districtW18 = 10998 if districtW18 == 469
replace districtW18 = 10999 if districtW18 == 470
replace districtW18 = 11000 if districtW18 == 471
replace districtW18 = 11001 if districtW18 == 472
replace districtW18 = 11002 if districtW18 == 473
replace districtW18 = 11003 if districtW18 == 474
replace districtW18 = 11004 if districtW18 == 475
replace districtW18 = 11005 if districtW18 == 476
replace districtW18 = 11006 if districtW18 == 477
replace districtW18 = 11007 if districtW18 == 478
replace districtW18 = 11008 if districtW18 == 479
replace districtW18 = 11009 if districtW18 == 480
replace districtW18 = 11010 if districtW18 == 481
replace districtW18 = 11011 if districtW18 == 482
replace districtW18 = 11012 if districtW18 == 483
replace districtW18 = 11013 if districtW18 == 484
replace districtW18 = 11014 if districtW18 == 485
replace districtW18 = 11015 if districtW18 == 486
replace districtW18 = 11016 if districtW18 == 487
replace districtW18 = 11017 if districtW18 == 488
replace districtW18 = 11018 if districtW18 == 489
replace districtW18 = 11019 if districtW18 == 490
replace districtW18 = 11020 if districtW18 == 491
replace districtW18 = 11021 if districtW18 == 492
replace districtW18 = 11022 if districtW18 == 493
replace districtW18 = 11023 if districtW18 == 494
replace districtW18 = 11024 if districtW18 == 495
replace districtW18 = 11025 if districtW18 == 496
replace districtW18 = 11026 if districtW18 == 497
replace districtW18 = 11027 if districtW18 == 498
replace districtW18 = 11028 if districtW18 == 499
replace districtW18 = 11029 if districtW18 == 500
replace districtW18 = 11030 if districtW18 == 501
replace districtW18 = 11031 if districtW18 == 502
replace districtW18 = 11032 if districtW18 == 503
replace districtW18 = 11033 if districtW18 == 504
replace districtW18 = 11034 if districtW18 == 505
replace districtW18 = 11035 if districtW18 == 506
replace districtW18 = 11036 if districtW18 == 507
replace districtW18 = 11037 if districtW18 == 508
replace districtW18 = 11038 if districtW18 == 509
replace districtW18 = 11039 if districtW18 == 510
replace districtW18 = 11040 if districtW18 == 511
replace districtW18 = 11041 if districtW18 == 512
replace districtW18 = 11042 if districtW18 == 513
replace districtW18 = 11043 if districtW18 == 514
replace districtW18 = 11044 if districtW18 == 515
replace districtW18 = 11045 if districtW18 == 516
replace districtW18 = 11046 if districtW18 == 517
replace districtW18 = 11047 if districtW18 == 518
replace districtW18 = 11048 if districtW18 == 519
replace districtW18 = 11049 if districtW18 == 520
replace districtW18 = 11050 if districtW18 == 521
replace districtW18 = 11051 if districtW18 == 522
replace districtW18 = 11052 if districtW18 == 523
replace districtW18 = 11053 if districtW18 == 524
replace districtW18 = 11054 if districtW18 == 525
replace districtW18 = 11055 if districtW18 == 526
replace districtW18 = 11056 if districtW18 == 527
replace districtW18 = 11057 if districtW18 == 528
replace districtW18 = 11058 if districtW18 == 529
replace districtW18 = 11059 if districtW18 == 530
replace districtW18 = 11060 if districtW18 == 531
replace districtW18 = 11061 if districtW18 == 532
replace districtW18 = 11062 if districtW18 == 533
replace districtW18 = 30041 if districtW18 == 534
replace districtW18 = 30042 if districtW18 == 535
replace districtW18 = 30043 if districtW18 == 536
replace districtW18 = 30044 if districtW18 == 537
replace districtW18 = 30045 if districtW18 == 538
replace districtW18 = 30046 if districtW18 == 539
replace districtW18 = 30047 if districtW18 == 540
replace districtW18 = 30048 if districtW18 == 541
replace districtW18 = 30049 if districtW18 == 542
replace districtW18 = 30050 if districtW18 == 543
replace districtW18 = 30051 if districtW18 == 544
replace districtW18 = 30052 if districtW18 == 545
replace districtW18 = 30053 if districtW18 == 546
replace districtW18 = 30054 if districtW18 == 547
replace districtW18 = 30055 if districtW18 == 548
replace districtW18 = 30056 if districtW18 == 549
replace districtW18 = 30057 if districtW18 == 550
replace districtW18 = 30058 if districtW18 == 551
replace districtW18 = 30059 if districtW18 == 552
replace districtW18 = 30060 if districtW18 == 553
replace districtW18 = 30061 if districtW18 == 554
replace districtW18 = 30062 if districtW18 == 555
replace districtW18 = 30063 if districtW18 == 556
replace districtW18 = 30064 if districtW18 == 557
replace districtW18 = 30065 if districtW18 == 558
replace districtW18 = 30066 if districtW18 == 559
replace districtW18 = 30067 if districtW18 == 560
replace districtW18 = 30068 if districtW18 == 561
replace districtW18 = 30069 if districtW18 == 562
replace districtW18 = 30070 if districtW18 == 563
replace districtW18 = 30071 if districtW18 == 564
replace districtW18 = 30072 if districtW18 == 565
replace districtW18 = 30073 if districtW18 == 566
replace districtW18 = 30074 if districtW18 == 567
replace districtW18 = 30075 if districtW18 == 568
replace districtW18 = 30076 if districtW18 == 569
replace districtW18 = 30077 if districtW18 == 570
replace districtW18 = 30078 if districtW18 == 571
replace districtW18 = 30079 if districtW18 == 572
replace districtW18 = 30080 if districtW18 == 573
replace districtW18 = 20001 if districtW18 == 574
replace districtW18 = 20002 if districtW18 == 575
replace districtW18 = 20003 if districtW18 == 576
replace districtW18 = 20004 if districtW18 == 577
replace districtW18 = 20005 if districtW18 == 578
replace districtW18 = 20006 if districtW18 == 579
replace districtW18 = 20007 if districtW18 == 580
replace districtW18 = 20008 if districtW18 == 581
replace districtW18 = 20009 if districtW18 == 582
replace districtW18 = 20010 if districtW18 == 583
replace districtW18 = 20011 if districtW18 == 584
replace districtW18 = 20012 if districtW18 == 585
replace districtW18 = 20013 if districtW18 == 586
replace districtW18 = 20014 if districtW18 == 587
replace districtW18 = 20015 if districtW18 == 588
replace districtW18 = 20016 if districtW18 == 589
replace districtW18 = 20017 if districtW18 == 590
replace districtW18 = 20018 if districtW18 == 591
replace districtW18 = 20019 if districtW18 == 592
replace districtW18 = 20020 if districtW18 == 593
replace districtW18 = 20021 if districtW18 == 594
replace districtW18 = 20022 if districtW18 == 595
replace districtW18 = 20023 if districtW18 == 596
replace districtW18 = 20024 if districtW18 == 597
replace districtW18 = 20025 if districtW18 == 598
replace districtW18 = 20026 if districtW18 == 599
replace districtW18 = 20028 if districtW18 == 600
replace districtW18 = 20029 if districtW18 == 601
replace districtW18 = 20030 if districtW18 == 602
replace districtW18 = 20031 if districtW18 == 603
replace districtW18 = 20032 if districtW18 == 604
replace districtW18 = 20033 if districtW18 == 605
replace districtW18 = 20034 if districtW18 == 606
replace districtW18 = 20035 if districtW18 == 607
replace districtW18 = 20036 if districtW18 == 608
replace districtW18 = 20037 if districtW18 == 609
replace districtW18 = 20038 if districtW18 == 610
replace districtW18 = 20039 if districtW18 == 611
replace districtW18 = 20040 if districtW18 == 612
replace districtW18 = 20041 if districtW18 == 613
replace districtW18 = 20042 if districtW18 == 614
replace districtW18 = 20043 if districtW18 == 615
replace districtW18 = 20044 if districtW18 == 616
replace districtW18 = 20045 if districtW18 == 617
replace districtW18 = 20046 if districtW18 == 618
replace districtW18 = 20047 if districtW18 == 619
replace districtW18 = 20027 if districtW18 == 620
replace districtW18 = 20048 if districtW18 == 621
replace districtW18 = 20049 if districtW18 == 622
replace districtW18 = 20050 if districtW18 == 623
replace districtW18 = 20051 if districtW18 == 624
replace districtW18 = 20052 if districtW18 == 625
replace districtW18 = 20053 if districtW18 == 626
replace districtW18 = 20054 if districtW18 == 627
replace districtW18 = 20055 if districtW18 == 628
replace districtW18 = 20056 if districtW18 == 629
replace districtW18 = 20057 if districtW18 == 630
replace districtW18 = 20058 if districtW18 == 631
replace districtW18 = 20059 if districtW18 == 632
replace districtW18 = 40001 if districtW18 == 701
replace districtW18 = 40002 if districtW18 == 702
replace districtW18 = 40003 if districtW18 == 703
replace districtW18 = 40004 if districtW18 == 704
replace districtW18 = 40005 if districtW18 == 705
replace districtW18 = 40006 if districtW18 == 706
replace districtW18 = 40007 if districtW18 == 707
replace districtW18 = 40008 if districtW18 == 708
replace districtW18 = 40009 if districtW18 == 709
replace districtW18 = 40010 if districtW18 == 710
replace districtW18 = 40011 if districtW18 == 711
replace districtW18 = 40012 if districtW18 == 712
replace districtW18 = 40013 if districtW18 == 713
replace districtW18 = 40014 if districtW18 == 714
replace districtW18 = 40015 if districtW18 == 715
replace districtW18 = 40016 if districtW18 == 716
replace districtW18 = 40017 if districtW18 == 717
replace districtW18 = 40018 if districtW18 == 718

* Define label for constituency names

label define constituency 0 "NOT in a 2010 Parliamentary Constituency" 30049 "Aberavon" 30058 "Aberconwy" 20001 "Aberdeen North" 20002 "Aberdeen South" 20003 "Airdrie and Shotts" 10530 "Aldershot" 10531 "Aldridge-Brownhills" 10532 "Altrincham and Sale West" 30043 "Alyn and Deeside" 10533 "Amber Valley" 20004 "Angus" 30057 "Arfon" 20005 "Argyll and Bute" 10534 "Arundel and South Downs" 10535 "Ashfield" 10536 "Ashford" 10537 "Ashton-Under-Lyne" 10538 "Aylesbury" 20006 "Ayr, Carrick and Cumnock" 10539 "Banbury" 20007 "Banff and Buchan" 10540 "Barking" 10541 "Barnsley Central" 10542 "Barnsley East" 10543 "Barrow and Furness" 10544 "Basildon and Billericay" 10545 "Basingstoke" 10546 "Bassetlaw" 10547 "Bath" 10548 "Batley and Spen" 10549 "Battersea" 10550 "Beaconsfield" 10551 "Beckenham" 10552 "Bedford" 40001 "Belfast East" 40002 "Belfast North" 40003 "Belfast South" 40004 "Belfast West" 10553 "Bermondsey and Old Southwark" 20008 "Berwickshire, Roxburgh and Selkirk" 10554 "Berwick-Upon-Tweed" 10555 "Bethnal Green and Bow" 10556 "Beverley and Holderness" 10557 "Bexhill and Battle" 10558 "Bexleyheath and Crayford" 10559 "Birkenhead" 10560 "Birmingham, Edgbaston" 10561 "Birmingham, Erdington" 10562 "Birmingham, Hall Green" 10563 "Birmingham, Hodge Hill" 10564 "Birmingham, Ladywood" 10565 "Birmingham, Northfield" 10566 "Birmingham, Perry Barr" 10567 "Birmingham, Selly Oak" 10568 "Birmingham, Yardley" 10569 "Bishop Auckland" 10570 "Blackburn" 10571 "Blackley and Broughton" 10572 "Blackpool North and Cleveleys" 10573 "Blackpool South" 30072 "Blaenau Gwent" 10574 "Blaydon" 10575 "Blyth Valley" 10576 "Bognor Regis and Littlehampton" 10577 "Bolsover" 10578 "Bolton North East" 10579 "Bolton South East" 10580 "Bolton West" 10581 "Bootle" 10582 "Boston and Skegness" 10583 "Bosworth" 10584 "Bournemouth East" 10585 "Bournemouth West" 10586 "Bracknell" 10587 "Bradford East" 10588 "Bradford South" 10589 "Bradford West" 10590 "Braintree" 30068 "Brecon and Radnorshire" 10591 "Brent Central" 10592 "Brent North" 10593 "Brentford and Isleworth" 10594 "Brentwood and Ongar" 30073 "Bridgend" 10595 "Bridgwater and West Somerset" 10596 "Brigg and Goole" 10597 "Brighton, Kemptown" 10598 "Brighton, Pavilion" 10599 "Bristol East" 10600 "Bristol North West" 10601 "Bristol South" 10602 "Bristol West" 10603 "Broadland" 10604 "Bromley and Chislehurst" 10605 "Bromsgrove" 10606 "Broxbourne" 10607 "Broxtowe" 10608 "Buckingham" 10609 "Burnley" 10610 "Burton" 10611 "Bury North" 10612 "Bury South" 10613 "Bury St Edmunds" 30076 "Caerphilly" 20009 "Caithness, Sutherland and Easter Ross" 10614 "Calder Valley" 10615 "Camberwell and Peckham" 10616 "Camborne and Redruth" 10617 "Cambridge" 10618 "Cannock Chase" 10619 "Canterbury" 30050 "Cardiff Central" 30051 "Cardiff North" 30080 "Cardiff South and Penarth" 30079 "Cardiff West" 10620 "Carlisle" 30067 "Carmarthen East and Dinefwr" 30066 "Carmarthen West and South Pembrokeshire" 10621 "Carshalton and Wallington" 10622 "Castle Point" 20010 "Central Ayrshire" 10623 "Central Devon" 10624 "Central Suffolk and North Ipswich" 30064 "Ceredigion" 10625 "Charnwood" 10626 "Chatham and Aylesford" 10627 "Cheadle" 10628 "Chelmsford" 10629 "Chelsea and Fulham" 10630 "Cheltenham" 10631 "Chesham and Amersham" 10632 "Chesterfield" 10633 "Chichester" 10634 "Chingford and Woodford Green" 10635 "Chippenham" 10636 "Chipping Barnet" 10637 "Chorley" 10638 "Christchurch" 10639 "Cities Of London and Westminster" 10640 "City Of Chester" 10641 "City Of Durham" 10642 "Clacton" 10643 "Cleethorpes" 30062 "Clwyd South" 30059 "Clwyd West" 20011 "Coatbridge, Chryston and Bellshill" 10644 "Colchester" 10645 "Colne Valley" 10646 "Congleton" 10647 "Copeland" 10648 "Corby" 10649 "Coventry North East" 10650 "Coventry North West" 10651 "Coventry South" 10652 "Crawley" 10653 "Crewe and Nantwich" 10654 "Croydon Central" 10655 "Croydon North" 10656 "Croydon South" 20012 "Cumbernauld, Kilsyth and Kirkintilloch East" 30070 "Cynon Valley" 10657 "Dagenham and Rainham" 10658 "Darlington" 10659 "Dartford" 10660 "Daventry" 30042 "Delyn" 10661 "Denton and Reddish" 10662 "Derby North" 10663 "Derby South" 10664 "Derbyshire Dales" 10665 "Devizes" 10666 "Dewsbury" 10667 "Don Valley" 10668 "Doncaster Central" 10669 "Doncaster North" 10670 "Dover" 10671 "Dudley North" 10672 "Dudley South" 10673 "Dulwich and West Norwood" 20013 "Dumfries and Galloway" 20014 "Dumfriesshire, Clydesdale and Tweeddale" 20015 "Dundee East" 20016 "Dundee West" 20017 "Dunfermline and West Fife" 30061 "Dwyfor Meirionnydd" 10674 "Ealing Central and Acton" 10675 "Ealing North" 10676 "Ealing, Southall" 10677 "Easington" 40005 "East Antrim" 10678 "East Devon" 20018 "East Dunbartonshire" 10679 "East Ham" 10680 "East Hampshire" 20019 "East Kilbride, Strathaven and Lesmahagow" 40006 "East Londonderry" 20020 "East Lothian" 20021 "East Renfrewshire" 10681 "East Surrey" 10682 "East Worthing and Shoreham" 10683 "East Yorkshire" 10684 "Eastbourne" 10685 "Eastleigh" 10686 "Eddisbury" 20022 "Edinburgh East" 20023 "Edinburgh North and Leith" 20024 "Edinburgh South" 20025 "Edinburgh South West" 20026 "Edinburgh West" 10687 "Edmonton" 10688 "Ellesmere Port and Neston" 10689 "Elmet and Rothwell" 10690 "Eltham" 10691 "Enfield North" 10692 "Enfield, Southgate" 10693 "Epping Forest" 10694 "Epsom and Ewell" 10695 "Erewash" 10696 "Erith and Thamesmead" 10697 "Esher and Walton" 10698 "Exeter" 20028 "Falkirk" 10699 "Fareham" 10700 "Faversham and Mid Kent" 10701 "Feltham and Heston" 40007 "Fermanagh and South Tyrone" 10702 "Filton and Bradley Stoke" 10703 "Finchley and Golders Green" 10704 "Folkestone and Hythe" 10705 "Forest Of Dean" 40008 "Foyle" 10706 "Fylde" 10707 "Gainsborough" 10708 "Garston and Halewood" 10709 "Gateshead" 10710 "Gedling" 10711 "Gillingham and Rainham" 20029 "Glasgow Central" 20030 "Glasgow East" 20031 "Glasgow North" 20032 "Glasgow North East" 20033 "Glasgow North West" 20034 "Glasgow South" 20035 "Glasgow South West" 20036 "Glenrothes" 10712 "Gloucester" 20037 "Gordon" 10713 "Gosport" 30046 "Gower" 10714 "Grantham and Stamford" 10715 "Gravesham" 10716 "Great Grimsby" 10717 "Great Yarmouth" 10718 "Greenwich and Woolwich" 10719 "Guildford" 10720 "Hackney North and Stoke Newington" 10721 "Hackney South and Shoreditch" 10722 "Halesowen and Rowley Regis" 10723 "Halifax" 10724 "Haltemprice and Howden" 10725 "Halton" 10726 "Hammersmith" 10727 "Hampstead and Kilburn" 10728 "Harborough" 10729 "Harlow" 10730 "Harrogate and Knaresborough" 10731 "Harrow East" 10732 "Harrow West" 10733 "Hartlepool" 10734 "Harwich and North Essex" 10735 "Hastings and Rye" 10736 "Havant" 10737 "Hayes and Harlington" 10738 "Hazel Grove" 10739 "Hemel Hempstead" 10740 "Hemsworth" 10741 "Hendon" 10742 "Henley" 10743 "Hereford and South Herefordshire" 10744 "Hertford and Stortford" 10745 "Hertsmere" 10746 "Hexham" 10747 "Heywood and Middleton" 10748 "High Peak" 10749 "Hitchin and Harpenden" 10750 "Holborn and St Pancras" 10751 "Hornchurch and Upminster" 10752 "Hornsey and Wood Green" 10753 "Horsham" 10754 "Houghton and Sunderland South" 10755 "Hove" 10756 "Huddersfield" 10757 "Huntingdon" 10758 "Hyndburn" 10759 "Ilford North" 10760 "Ilford South" 20038 "Inverclyde" 20039 "Inverness, Nairn, Badenoch and Strathspey" 10761 "Ipswich" 10762 "Isle Of Wight" 10763 "Islington North" 10764 "Islington South and Finsbury" 30077 "Islwyn" 10765 "Jarrow" 10766 "Keighley" 10767 "Kenilworth and Southam" 10768 "Kensington" 10769 "Kettering" 20040 "Kilmarnock and Loudoun" 10770 "Kingston and Surbiton" 10771 "Kingston upon Hull East" 10772 "Kingston upon Hull North" 10773 "Kingston upon Hull West and Hessle" 10774 "Kingswood" 20041 "Kirkcaldy and Cowdenbeath" 10775 "Knowsley" 40009 "Lagan Valley" 20042 "Lanark and Hamilton East" 10776 "Lancaster and Fleetwood" 10777 "Leeds Central" 10778 "Leeds East" 10779 "Leeds North East" 10780 "Leeds North West" 10781 "Leeds West" 10782 "Leicester East" 10783 "Leicester South" 10784 "Leicester West" 10785 "Leigh" 10786 "Lewes" 10787 "Lewisham East" 10788 "Lewisham West and Penge" 10789 "Lewisham, Deptford" 10790 "Leyton and Wanstead" 10791 "Lichfield" 10792 "Lincoln" 20043 "Linlithgow and East Falkirk" 10793 "Liverpool, Riverside" 10794 "Liverpool, Walton" 10795 "Liverpool, Wavertree" 10796 "Liverpool, West Derby" 20044 "Livingston" 30045 "Llanelli" 10797 "Loughborough" 10798 "Louth and Horncastle" 10799 "Ludlow" 10800 "Luton North" 10801 "Luton South" 10802 "Macclesfield" 10803 "Maidenhead" 10804 "Maidstone and The Weald" 10805 "Makerfield" 10806 "Maldon" 10807 "Manchester Central" 10808 "Manchester, Gorton" 10809 "Manchester, Withington" 10810 "Mansfield" 10811 "Meon Valley" 10812 "Meriden" 30071 "Merthyr Tydfil and Rhymney" 10813 "Mid Bedfordshire" 10814 "Mid Derbyshire" 10815 "Mid Dorset and North Poole" 10816 "Mid Norfolk" 10817 "Mid Sussex" 40010 "Mid Ulster" 10818 "Mid Worcestershire" 10819 "Middlesbrough" 10820 "Middlesbrough South and East Cleveland" 20045 "Midlothian" 10821 "Milton Keynes North" 10822 "Milton Keynes South" 10823 "Mitcham and Morden" 10824 "Mole Valley" 30054 "Monmouth" 30063 "Montgomeryshire" 20046 "Moray" 10825 "Morecambe and Lunesdale" 10826 "Morley and Outwood" 20047 "Motherwell and Wishaw" 20027 "Na h-Eileanan An Iar" 30069 "Neath" 10827 "New Forest East" 10828 "New Forest West" 10829 "Newark" 10830 "Newbury" 10831 "Newcastle Upon Tyne Central" 10832 "Newcastle Upon Tyne East" 10833 "Newcastle Upon Tyne North" 10834 "Newcastle-Under-Lyme" 30055 "Newport East" 30056 "Newport West" 40011 "Newry and Armagh" 10835 "Newton Abbot" 10836 "Normanton, Pontefract and Castleford" 40012 "North Antrim" 20048 "North Ayrshire and Arran" 10837 "North Cornwall" 10838 "North Devon" 10839 "North Dorset" 40013 "North Down" 10840 "North Durham" 10841 "North East Bedfordshire" 10842 "North East Cambridgeshire" 10843 "North East Derbyshire" 20049 "North East Fife" 10844 "North East Hampshire" 10845 "North East Hertfordshire" 10846 "North East Somerset" 10847 "North Herefordshire" 10848 "North Norfolk" 10849 "North Shropshire" 10850 "North Somerset" 10851 "North Swindon" 10852 "North Thanet" 10853 "North Tyneside" 10854 "North Warwickshire" 10855 "North West Cambridgeshire" 10856 "North West Durham" 10857 "North West Hampshire" 10858 "North West Leicestershire" 10859 "North West Norfolk" 10860 "North Wiltshire" 10861 "Northampton North" 10862 "Northampton South" 10863 "Norwich North" 10864 "Norwich South" 10865 "Nottingham East" 10866 "Nottingham North" 10867 "Nottingham South" 10868 "Nuneaton" 20050 "Ochil and South Perthshire" 30074 "Ogmore" 10869 "Old Bexley and Sidcup" 10870 "Oldham East and Saddleworth" 10871 "Oldham West and Royton" 20051 "Orkney and Shetland" 10872 "Orpington" 10873 "Oxford East" 10874 "Oxford West and Abingdon" 20052 "Paisley and Renfrewshire North" 20053 "Paisley and Renfrewshire South" 10875 "Pendle" 10876 "Penistone and Stocksbridge" 10877 "Penrith and The Border" 20054 "Perth and North Perthshire" 10878 "Peterborough" 10879 "Plymouth, Moor View" 10880 "Plymouth, Sutton and Devonport" 30075 "Pontypridd" 10881 "Poole" 10882 "Poplar and Limehouse" 10883 "Portsmouth North" 10884 "Portsmouth South" 30065 "Preseli Pembrokeshire" 10885 "Preston" 10886 "Pudsey" 10887 "Putney" 10888 "Rayleigh and Wickford" 10889 "Reading East" 10890 "Reading West" 10891 "Redcar" 10892 "Redditch" 10893 "Reigate" 30052 "Rhondda" 10894 "Ribble Valley" 10895 "Richmond (Yorks)" 10896 "Richmond Park" 10897 "Rochdale" 10898 "Rochester and Strood" 10899 "Rochford and Southend East" 10900 "Romford" 10901 "Romsey and Southampton North" 20055 "Ross, Skye and Lochaber" 10902 "Rossendale and Darwen" 10903 "Rother Valley" 10904 "Rotherham" 10905 "Rugby" 10906 "Ruislip, Northwood and Pinner" 10907 "Runnymede and Weybridge" 10908 "Rushcliffe" 20056 "Rutherglen and Hamilton West" 10909 "Rutland and Melton" 10910 "Saffron Walden" 10911 "Salford and Eccles" 10912 "Salisbury" 10913 "Scarborough and Whitby" 10914 "Scunthorpe" 10915 "Sedgefield" 10916 "Sefton Central" 10917 "Selby and Ainsty" 10918 "Sevenoaks" 10919 "Sheffield Central" 10920 "Sheffield South East" 10921 "Sheffield, Brightside and Hillsborough" 10922 "Sheffield, Hallam" 10923 "Sheffield, Heeley" 10924 "Sherwood" 10925 "Shipley" 10926 "Shrewsbury and Atcham" 10927 "Sittingbourne and Sheppey" 10928 "Skipton and Ripon" 10929 "Sleaford and North Hykeham" 10930 "Slough" 10931 "Solihull" 10932 "Somerton and Frome" 40014 "South Antrim" 10933 "South Basildon and East Thurrock" 10934 "South Cambridgeshire" 10935 "South Derbyshire" 10936 "South Dorset" 40015 "South Down" 10937 "South East Cambridgeshire" 10938 "South East Cornwall" 10939 "South Holland and The Deepings" 10940 "South Leicestershire" 10941 "South Norfolk" 10942 "South Northamptonshire" 10943 "South Ribble" 10944 "South Shields" 10945 "South Staffordshire" 10946 "South Suffolk" 10947 "South Swindon" 10948 "South Thanet" 10949 "South West Bedfordshire" 10950 "South West Devon" 10951 "South West Hertfordshire" 10952 "South West Norfolk" 10953 "South West Surrey" 10954 "South West Wiltshire" 10955 "Southampton, Itchen" 10956 "Southampton, Test" 10957 "Southend West" 10958 "Southport" 10959 "Spelthorne" 10960 "St Albans" 10961 "St Austell and Newquay" 10962 "St Helens North" 10963 "St Helens South and Whiston" 10964 "St Ives" 10965 "Stafford" 10966 "Staffordshire Moorlands" 10967 "Stalybridge and Hyde" 10968 "Stevenage" 20057 "Stirling" 10969 "Stockport" 10970 "Stockton North" 10971 "Stockton South" 10972 "Stoke-On-Trent Central" 10973 "Stoke-On-Trent North" 10974 "Stoke-On-Trent South" 10975 "Stone" 10976 "Stourbridge" 40016 "Strangford" 10977 "Stratford-On-Avon" 10978 "Streatham" 10979 "Stretford and Urmston" 10980 "Stroud" 10981 "Suffolk Coastal" 10982 "Sunderland Central" 10983 "Surrey Heath" 10984 "Sutton and Cheam" 10985 "Sutton Coldfield" 30048 "Swansea East" 30047 "Swansea West" 10986 "Tamworth" 10987 "Tatton" 10988 "Taunton Deane" 10989 "Telford" 10990 "Tewkesbury" 10991 "The Cotswolds" 10992 "The Wrekin" 10993 "Thirsk and Malton" 10994 "Thornbury and Yate" 10995 "Thurrock" 10996 "Tiverton and Honiton" 10997 "Tonbridge and Malling" 10998 "Tooting" 10999 "Torbay" 30053 "Torfaen" 11000 "Torridge and West Devon" 11001 "Totnes" 11002 "Tottenham" 11003 "Truro and Falmouth" 11004 "Tunbridge Wells" 11005 "Twickenham" 11006 "Tynemouth" 40017 "Upper Bann" 11007 "Uxbridge and South Ruislip" 30060 "Vale Of Clwyd" 30078 "Vale Of Glamorgan" 11008 "Vauxhall" 11009 "Wakefield" 11010 "Wallasey" 11011 "Walsall North" 11012 "Walsall South" 11013 "Walthamstow" 11014 "Wansbeck" 11015 "Wantage" 11016 "Warley" 11017 "Warrington North" 11018 "Warrington South" 11019 "Warwick and Leamington" 11020 "Washington and Sunderland West" 11021 "Watford" 11022 "Waveney" 11023 "Wealden" 11024 "Weaver Vale" 11025 "Wellingborough" 11026 "Wells" 11027 "Welwyn Hatfield" 11028 "Wentworth and Dearne" 20058 "West Aberdeenshire and Kincardine" 11029 "West Bromwich East" 11030 "West Bromwich West" 11031 "West Dorset" 20059 "West Dunbartonshire" 11032 "West Ham" 11033 "West Lancashire" 11034 "West Suffolk" 40018 "West Tyrone" 11035 "West Worcestershire" 11036 "Westminster North" 11037 "Westmorland and Lonsdale" 11038 "Weston-Super-Mare" 11039 "Wigan" 11040 "Wimbledon" 11041 "Winchester" 11042 "Windsor" 11043 "Wirral South" 11044 "Wirral West" 11045 "Witham" 11046 "Witney" 11047 "Woking" 11048 "Wokingham" 11049 "Wolverhampton North East" 11050 "Wolverhampton South East" 11051 "Wolverhampton South West" 11052 "Worcester" 11053 "Workington" 11054 "Worsley and Eccles South" 11055 "Worthing West" 30044 "Wrexham" 11056 "Wycombe" 11057 "Wyre and Preston North" 11058 "Wyre Forest" 11059 "Wythenshawe and Sale East" 11060 "Yeovil" 30041 "Ynys Mon" 11061 "York Central" 11062 "York Outer" 998 "998"

label values districtW11 districtW12 districtW17 districtW18 constituency


****************************************************
** DISTRICT-LEVEL OUTCOMES: 2015 GENERAL ELECTION **
****************************************************

* Note: 1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = SNP, 5 = Plaid Cymru, 6 = UKIP, 7 = Green Party, 8 = BNP, 9 = other party (including independents), 11 = Change UK – The Independent Group, 12 = Brexit Party, -9999 = Northern Ireland party

gen GB15_outcomeW4 = .

replace GB15_outcomeW4 = 2 if districtW4 == 30049 
replace GB15_outcomeW4 = 1 if districtW4 == 30058 
replace GB15_outcomeW4 = 4 if districtW4 == 20001 
replace GB15_outcomeW4 = 4 if districtW4 == 20002 
replace GB15_outcomeW4 = 4 if districtW4 == 20003 
replace GB15_outcomeW4 = 1 if districtW4 == 10530 
replace GB15_outcomeW4 = 1 if districtW4 == 10531 
replace GB15_outcomeW4 = 1 if districtW4 == 10532 
replace GB15_outcomeW4 = 2 if districtW4 == 30043 
replace GB15_outcomeW4 = 1 if districtW4 == 10533 
replace GB15_outcomeW4 = 4 if districtW4 == 20004 
replace GB15_outcomeW4 = 5 if districtW4 == 30057 
replace GB15_outcomeW4 = 4 if districtW4 == 20005 
replace GB15_outcomeW4 = 1 if districtW4 == 10534 
replace GB15_outcomeW4 = 2 if districtW4 == 10535 
replace GB15_outcomeW4 = 1 if districtW4 == 10536 
replace GB15_outcomeW4 = 2 if districtW4 == 10537 
replace GB15_outcomeW4 = 1 if districtW4 == 10538 
replace GB15_outcomeW4 = 4 if districtW4 == 20006 
replace GB15_outcomeW4 = 1 if districtW4 == 10539 
replace GB15_outcomeW4 = 4 if districtW4 == 20007 
replace GB15_outcomeW4 = 2 if districtW4 == 10540 
replace GB15_outcomeW4 = 2 if districtW4 == 10541 
replace GB15_outcomeW4 = 2 if districtW4 == 10542 
replace GB15_outcomeW4 = 2 if districtW4 == 10543 
replace GB15_outcomeW4 = 1 if districtW4 == 10544 
replace GB15_outcomeW4 = 1 if districtW4 == 10545 
replace GB15_outcomeW4 = 2 if districtW4 == 10546 
replace GB15_outcomeW4 = 1 if districtW4 == 10547 
replace GB15_outcomeW4 = 2 if districtW4 == 10548 
replace GB15_outcomeW4 = 1 if districtW4 == 10549 
replace GB15_outcomeW4 = 1 if districtW4 == 10550 
replace GB15_outcomeW4 = 1 if districtW4 == 10551 
replace GB15_outcomeW4 = 1 if districtW4 == 10552 
replace GB15_outcomeW4 = -9999 if districtW4 == 40001 
replace GB15_outcomeW4 = -9999 if districtW4 == 40002 
replace GB15_outcomeW4 = -9999 if districtW4 == 40003 
replace GB15_outcomeW4 = -9999 if districtW4 == 40004 
replace GB15_outcomeW4 = 2 if districtW4 == 10553 
replace GB15_outcomeW4 = 4 if districtW4 == 20008 
replace GB15_outcomeW4 = 1 if districtW4 == 10554 
replace GB15_outcomeW4 = 2 if districtW4 == 10555 
replace GB15_outcomeW4 = 1 if districtW4 == 10556 
replace GB15_outcomeW4 = 1 if districtW4 == 10557 
replace GB15_outcomeW4 = 1 if districtW4 == 10558 
replace GB15_outcomeW4 = 2 if districtW4 == 10559 
replace GB15_outcomeW4 = 2 if districtW4 == 10560 
replace GB15_outcomeW4 = 2 if districtW4 == 10561 
replace GB15_outcomeW4 = 2 if districtW4 == 10562 
replace GB15_outcomeW4 = 2 if districtW4 == 10563 
replace GB15_outcomeW4 = 2 if districtW4 == 10564 
replace GB15_outcomeW4 = 2 if districtW4 == 10565 
replace GB15_outcomeW4 = 2 if districtW4 == 10566 
replace GB15_outcomeW4 = 2 if districtW4 == 10567 
replace GB15_outcomeW4 = 2 if districtW4 == 10568 
replace GB15_outcomeW4 = 2 if districtW4 == 10569 
replace GB15_outcomeW4 = 2 if districtW4 == 10570 
replace GB15_outcomeW4 = 2 if districtW4 == 10571 
replace GB15_outcomeW4 = 1 if districtW4 == 10572 
replace GB15_outcomeW4 = 2 if districtW4 == 10573 
replace GB15_outcomeW4 = 2 if districtW4 == 30072 
replace GB15_outcomeW4 = 2 if districtW4 == 10574 
replace GB15_outcomeW4 = 2 if districtW4 == 10575 
replace GB15_outcomeW4 = 1 if districtW4 == 10576 
replace GB15_outcomeW4 = 2 if districtW4 == 10577 
replace GB15_outcomeW4 = 2 if districtW4 == 10578 
replace GB15_outcomeW4 = 2 if districtW4 == 10579 
replace GB15_outcomeW4 = 1 if districtW4 == 10580 
replace GB15_outcomeW4 = 2 if districtW4 == 10581 
replace GB15_outcomeW4 = 1 if districtW4 == 10582 
replace GB15_outcomeW4 = 1 if districtW4 == 10583 
replace GB15_outcomeW4 = 1 if districtW4 == 10584 
replace GB15_outcomeW4 = 1 if districtW4 == 10585 
replace GB15_outcomeW4 = 1 if districtW4 == 10586 
replace GB15_outcomeW4 = 2 if districtW4 == 10587 
replace GB15_outcomeW4 = 2 if districtW4 == 10588 
replace GB15_outcomeW4 = 2 if districtW4 == 10589 
replace GB15_outcomeW4 = 1 if districtW4 == 10590 
replace GB15_outcomeW4 = 1 if districtW4 == 30068 
replace GB15_outcomeW4 = 2 if districtW4 == 10591 
replace GB15_outcomeW4 = 2 if districtW4 == 10593 
replace GB15_outcomeW4 = 2 if districtW4 == 10592 
replace GB15_outcomeW4 = 1 if districtW4 == 10594 
replace GB15_outcomeW4 = 2 if districtW4 == 30073 
replace GB15_outcomeW4 = 1 if districtW4 == 10595 
replace GB15_outcomeW4 = 1 if districtW4 == 10596 
replace GB15_outcomeW4 = 1 if districtW4 == 10597 
replace GB15_outcomeW4 = 7 if districtW4 == 10598 
replace GB15_outcomeW4 = 2 if districtW4 == 10599 
replace GB15_outcomeW4 = 1 if districtW4 == 10600 
replace GB15_outcomeW4 = 2 if districtW4 == 10601 
replace GB15_outcomeW4 = 2 if districtW4 == 10602 
replace GB15_outcomeW4 = 1 if districtW4 == 10603 
replace GB15_outcomeW4 = 1 if districtW4 == 10604 
replace GB15_outcomeW4 = 1 if districtW4 == 10605 
replace GB15_outcomeW4 = 1 if districtW4 == 10606 
replace GB15_outcomeW4 = 1 if districtW4 == 10607 
replace GB15_outcomeW4 = 1 if districtW4 == 10608 
replace GB15_outcomeW4 = 2 if districtW4 == 10609 
replace GB15_outcomeW4 = 1 if districtW4 == 10610 
replace GB15_outcomeW4 = 1 if districtW4 == 10611 
replace GB15_outcomeW4 = 2 if districtW4 == 10612 
replace GB15_outcomeW4 = 1 if districtW4 == 10613 
replace GB15_outcomeW4 = 2 if districtW4 == 30076 
replace GB15_outcomeW4 = 4 if districtW4 == 20009 
replace GB15_outcomeW4 = 1 if districtW4 == 10614 
replace GB15_outcomeW4 = 2 if districtW4 == 10615 
replace GB15_outcomeW4 = 1 if districtW4 == 10616 
replace GB15_outcomeW4 = 2 if districtW4 == 10617 
replace GB15_outcomeW4 = 1 if districtW4 == 10618 
replace GB15_outcomeW4 = 1 if districtW4 == 10619 
replace GB15_outcomeW4 = 2 if districtW4 == 30050 
replace GB15_outcomeW4 = 1 if districtW4 == 30051 
replace GB15_outcomeW4 = 2 if districtW4 == 30080 
replace GB15_outcomeW4 = 2 if districtW4 == 30079 
replace GB15_outcomeW4 = 1 if districtW4 == 10620 
replace GB15_outcomeW4 = 5 if districtW4 == 30067 
replace GB15_outcomeW4 = 1 if districtW4 == 30066 
replace GB15_outcomeW4 = 3 if districtW4 == 10621 
replace GB15_outcomeW4 = 1 if districtW4 == 10622 
replace GB15_outcomeW4 = 4 if districtW4 == 20010 
replace GB15_outcomeW4 = 1 if districtW4 == 10623 
replace GB15_outcomeW4 = 1 if districtW4 == 10624 
replace GB15_outcomeW4 = 3 if districtW4 == 30064 
replace GB15_outcomeW4 = 1 if districtW4 == 10625 
replace GB15_outcomeW4 = 1 if districtW4 == 10626 
replace GB15_outcomeW4 = 1 if districtW4 == 10627 
replace GB15_outcomeW4 = 1 if districtW4 == 10628 
replace GB15_outcomeW4 = 1 if districtW4 == 10629 
replace GB15_outcomeW4 = 1 if districtW4 == 10630 
replace GB15_outcomeW4 = 1 if districtW4 == 10631 
replace GB15_outcomeW4 = 2 if districtW4 == 10632 
replace GB15_outcomeW4 = 1 if districtW4 == 10633 
replace GB15_outcomeW4 = 1 if districtW4 == 10634 
replace GB15_outcomeW4 = 1 if districtW4 == 10635 
replace GB15_outcomeW4 = 1 if districtW4 == 10636 
replace GB15_outcomeW4 = 2 if districtW4 == 10637 
replace GB15_outcomeW4 = 1 if districtW4 == 10638 
replace GB15_outcomeW4 = 1 if districtW4 == 10639 
replace GB15_outcomeW4 = 2 if districtW4 == 10640 
replace GB15_outcomeW4 = 2 if districtW4 == 10641 
replace GB15_outcomeW4 = 6 if districtW4 == 10642 
replace GB15_outcomeW4 = 1 if districtW4 == 10643 
replace GB15_outcomeW4 = 2 if districtW4 == 30062 
replace GB15_outcomeW4 = 1 if districtW4 == 30059 
replace GB15_outcomeW4 = 4 if districtW4 == 20011 
replace GB15_outcomeW4 = 1 if districtW4 == 10644 
replace GB15_outcomeW4 = 1 if districtW4 == 10645 
replace GB15_outcomeW4 = 1 if districtW4 == 10646 
replace GB15_outcomeW4 = 2 if districtW4 == 10647 
replace GB15_outcomeW4 = 1 if districtW4 == 10648 
replace GB15_outcomeW4 = 2 if districtW4 == 10649 
replace GB15_outcomeW4 = 2 if districtW4 == 10650 
replace GB15_outcomeW4 = 2 if districtW4 == 10651 
replace GB15_outcomeW4 = 1 if districtW4 == 10652 
replace GB15_outcomeW4 = 1 if districtW4 == 10653 
replace GB15_outcomeW4 = 1 if districtW4 == 10654 
replace GB15_outcomeW4 = 2 if districtW4 == 10655 
replace GB15_outcomeW4 = 1 if districtW4 == 10656 
replace GB15_outcomeW4 = 4 if districtW4 == 20012 
replace GB15_outcomeW4 = 2 if districtW4 == 30070 
replace GB15_outcomeW4 = 2 if districtW4 == 10657 
replace GB15_outcomeW4 = 2 if districtW4 == 10658 
replace GB15_outcomeW4 = 1 if districtW4 == 10659 
replace GB15_outcomeW4 = 1 if districtW4 == 10660 
replace GB15_outcomeW4 = 2 if districtW4 == 30042 
replace GB15_outcomeW4 = 2 if districtW4 == 10661 
replace GB15_outcomeW4 = 1 if districtW4 == 10662 
replace GB15_outcomeW4 = 1 if districtW4 == 10664 
replace GB15_outcomeW4 = 2 if districtW4 == 10663 
replace GB15_outcomeW4 = 1 if districtW4 == 10665 
replace GB15_outcomeW4 = 2 if districtW4 == 10666 
replace GB15_outcomeW4 = 2 if districtW4 == 10668 
replace GB15_outcomeW4 = 2 if districtW4 == 10669 
replace GB15_outcomeW4 = 2 if districtW4 == 10667 
replace GB15_outcomeW4 = 1 if districtW4 == 10670 
replace GB15_outcomeW4 = 2 if districtW4 == 10671 
replace GB15_outcomeW4 = 1 if districtW4 == 10672 
replace GB15_outcomeW4 = 2 if districtW4 == 10673 
replace GB15_outcomeW4 = 4 if districtW4 == 20013 
replace GB15_outcomeW4 = 1 if districtW4 == 20014 
replace GB15_outcomeW4 = 4 if districtW4 == 20015 
replace GB15_outcomeW4 = 4 if districtW4 == 20016 
replace GB15_outcomeW4 = 4 if districtW4 == 20017 
replace GB15_outcomeW4 = 5 if districtW4 == 30061 
replace GB15_outcomeW4 = 2 if districtW4 == 10674 
replace GB15_outcomeW4 = 2 if districtW4 == 10675 
replace GB15_outcomeW4 = 2 if districtW4 == 10676 
replace GB15_outcomeW4 = 2 if districtW4 == 10677 
replace GB15_outcomeW4 = -9999 if districtW4 == 40005 
replace GB15_outcomeW4 = 1 if districtW4 == 10684 
replace GB15_outcomeW4 = 1 if districtW4 == 10678 
replace GB15_outcomeW4 = 4 if districtW4 == 20018 
replace GB15_outcomeW4 = 2 if districtW4 == 10679 
replace GB15_outcomeW4 = 1 if districtW4 == 10680 
replace GB15_outcomeW4 = 4 if districtW4 == 20019 
replace GB15_outcomeW4 = 1 if districtW4 == 10685 
replace GB15_outcomeW4 = -9999 if districtW4 == 40006 
replace GB15_outcomeW4 = 4 if districtW4 == 20020 
replace GB15_outcomeW4 = 4 if districtW4 == 20021 
replace GB15_outcomeW4 = 1 if districtW4 == 10681 
replace GB15_outcomeW4 = 1 if districtW4 == 10682 
replace GB15_outcomeW4 = 1 if districtW4 == 10683 
replace GB15_outcomeW4 = 1 if districtW4 == 10686 
replace GB15_outcomeW4 = 4 if districtW4 == 20022 
replace GB15_outcomeW4 = 4 if districtW4 == 20023 
replace GB15_outcomeW4 = 2 if districtW4 == 20024 
replace GB15_outcomeW4 = 4 if districtW4 == 20025 
replace GB15_outcomeW4 = 4 if districtW4 == 20026 
replace GB15_outcomeW4 = 2 if districtW4 == 10687 
replace GB15_outcomeW4 = 2 if districtW4 == 10688 
replace GB15_outcomeW4 = 1 if districtW4 == 10689 
replace GB15_outcomeW4 = 2 if districtW4 == 10690 
replace GB15_outcomeW4 = 2 if districtW4 == 10691 
replace GB15_outcomeW4 = 1 if districtW4 == 10692 
replace GB15_outcomeW4 = 1 if districtW4 == 10693 
replace GB15_outcomeW4 = 1 if districtW4 == 10694 
replace GB15_outcomeW4 = 1 if districtW4 == 10695 
replace GB15_outcomeW4 = 2 if districtW4 == 10696 
replace GB15_outcomeW4 = 1 if districtW4 == 10697 
replace GB15_outcomeW4 = 2 if districtW4 == 10698 
replace GB15_outcomeW4 = 4 if districtW4 == 20028 
replace GB15_outcomeW4 = 1 if districtW4 == 10699 
replace GB15_outcomeW4 = 1 if districtW4 == 10700 
replace GB15_outcomeW4 = 2 if districtW4 == 10701 
replace GB15_outcomeW4 = -9999 if districtW4 == 40007 
replace GB15_outcomeW4 = 1 if districtW4 == 10702 
replace GB15_outcomeW4 = 1 if districtW4 == 10703 
replace GB15_outcomeW4 = 1 if districtW4 == 10704 
replace GB15_outcomeW4 = 1 if districtW4 == 10705 
replace GB15_outcomeW4 = -9999 if districtW4 == 40008 
replace GB15_outcomeW4 = 1 if districtW4 == 10706 
replace GB15_outcomeW4 = 1 if districtW4 == 10707 
replace GB15_outcomeW4 = 2 if districtW4 == 10708 
replace GB15_outcomeW4 = 2 if districtW4 == 10709 
replace GB15_outcomeW4 = 2 if districtW4 == 10710 
replace GB15_outcomeW4 = 1 if districtW4 == 10711 
replace GB15_outcomeW4 = 4 if districtW4 == 20029 
replace GB15_outcomeW4 = 4 if districtW4 == 20030 
replace GB15_outcomeW4 = 4 if districtW4 == 20031 
replace GB15_outcomeW4 = 4 if districtW4 == 20032 
replace GB15_outcomeW4 = 4 if districtW4 == 20033 
replace GB15_outcomeW4 = 4 if districtW4 == 20034 
replace GB15_outcomeW4 = 4 if districtW4 == 20035 
replace GB15_outcomeW4 = 4 if districtW4 == 20036 
replace GB15_outcomeW4 = 1 if districtW4 == 10712 
replace GB15_outcomeW4 = 4 if districtW4 == 20037 
replace GB15_outcomeW4 = 1 if districtW4 == 10713 
replace GB15_outcomeW4 = 1 if districtW4 == 30046 
replace GB15_outcomeW4 = 1 if districtW4 == 10714 
replace GB15_outcomeW4 = 1 if districtW4 == 10715 
replace GB15_outcomeW4 = 2 if districtW4 == 10716 
replace GB15_outcomeW4 = 1 if districtW4 == 10717 
replace GB15_outcomeW4 = 2 if districtW4 == 10718 
replace GB15_outcomeW4 = 1 if districtW4 == 10719 
replace GB15_outcomeW4 = 2 if districtW4 == 10720 
replace GB15_outcomeW4 = 2 if districtW4 == 10721 
replace GB15_outcomeW4 = 1 if districtW4 == 10722 
replace GB15_outcomeW4 = 2 if districtW4 == 10723 
replace GB15_outcomeW4 = 1 if districtW4 == 10724 
replace GB15_outcomeW4 = 2 if districtW4 == 10725 
replace GB15_outcomeW4 = 2 if districtW4 == 10726 
replace GB15_outcomeW4 = 2 if districtW4 == 10727 
replace GB15_outcomeW4 = 1 if districtW4 == 10728 
replace GB15_outcomeW4 = 1 if districtW4 == 10729 
replace GB15_outcomeW4 = 1 if districtW4 == 10730 
replace GB15_outcomeW4 = 1 if districtW4 == 10731 
replace GB15_outcomeW4 = 2 if districtW4 == 10732 
replace GB15_outcomeW4 = 2 if districtW4 == 10733 
replace GB15_outcomeW4 = 1 if districtW4 == 10734 
replace GB15_outcomeW4 = 1 if districtW4 == 10735 
replace GB15_outcomeW4 = 1 if districtW4 == 10736 
replace GB15_outcomeW4 = 2 if districtW4 == 10737 
replace GB15_outcomeW4 = 1 if districtW4 == 10738 
replace GB15_outcomeW4 = 1 if districtW4 == 10739 
replace GB15_outcomeW4 = 2 if districtW4 == 10740 
replace GB15_outcomeW4 = 1 if districtW4 == 10741 
replace GB15_outcomeW4 = 1 if districtW4 == 10742 
replace GB15_outcomeW4 = 1 if districtW4 == 10743 
replace GB15_outcomeW4 = 1 if districtW4 == 10744 
replace GB15_outcomeW4 = 1 if districtW4 == 10745 
replace GB15_outcomeW4 = 1 if districtW4 == 10746 
replace GB15_outcomeW4 = 2 if districtW4 == 10747 
replace GB15_outcomeW4 = 1 if districtW4 == 10748 
replace GB15_outcomeW4 = 1 if districtW4 == 10749 
replace GB15_outcomeW4 = 2 if districtW4 == 10750 
replace GB15_outcomeW4 = 1 if districtW4 == 10751 
replace GB15_outcomeW4 = 2 if districtW4 == 10752 
replace GB15_outcomeW4 = 1 if districtW4 == 10753 
replace GB15_outcomeW4 = 2 if districtW4 == 10754 
replace GB15_outcomeW4 = 2 if districtW4 == 10755 
replace GB15_outcomeW4 = 2 if districtW4 == 10756 
replace GB15_outcomeW4 = 1 if districtW4 == 10757 
replace GB15_outcomeW4 = 2 if districtW4 == 10758 
replace GB15_outcomeW4 = 2 if districtW4 == 10759 
replace GB15_outcomeW4 = 2 if districtW4 == 10760 
replace GB15_outcomeW4 = 4 if districtW4 == 20038 
replace GB15_outcomeW4 = 4 if districtW4 == 20039 
replace GB15_outcomeW4 = 1 if districtW4 == 10761 
replace GB15_outcomeW4 = 1 if districtW4 == 10762 
replace GB15_outcomeW4 = 2 if districtW4 == 10763 
replace GB15_outcomeW4 = 2 if districtW4 == 10764 
replace GB15_outcomeW4 = 2 if districtW4 == 30077 
replace GB15_outcomeW4 = 2 if districtW4 == 10765 
replace GB15_outcomeW4 = 1 if districtW4 == 10766 
replace GB15_outcomeW4 = 1 if districtW4 == 10767 
replace GB15_outcomeW4 = 1 if districtW4 == 10768 
replace GB15_outcomeW4 = 1 if districtW4 == 10769 
replace GB15_outcomeW4 = 4 if districtW4 == 20040 
replace GB15_outcomeW4 = 1 if districtW4 == 10770 
replace GB15_outcomeW4 = 2 if districtW4 == 10771 
replace GB15_outcomeW4 = 2 if districtW4 == 10772 
replace GB15_outcomeW4 = 2 if districtW4 == 10773 
replace GB15_outcomeW4 = 1 if districtW4 == 10774 
replace GB15_outcomeW4 = 4 if districtW4 == 20041 
replace GB15_outcomeW4 = 2 if districtW4 == 10775 
replace GB15_outcomeW4 = -9999 if districtW4 == 40009 
replace GB15_outcomeW4 = 4 if districtW4 == 20042 
replace GB15_outcomeW4 = 2 if districtW4 == 10776 
replace GB15_outcomeW4 = 2 if districtW4 == 10777 
replace GB15_outcomeW4 = 2 if districtW4 == 10778 
replace GB15_outcomeW4 = 2 if districtW4 == 10779 
replace GB15_outcomeW4 = 3 if districtW4 == 10780 
replace GB15_outcomeW4 = 2 if districtW4 == 10781 
replace GB15_outcomeW4 = 2 if districtW4 == 10782 
replace GB15_outcomeW4 = 2 if districtW4 == 10783 
replace GB15_outcomeW4 = 2 if districtW4 == 10784 
replace GB15_outcomeW4 = 2 if districtW4 == 10785 
replace GB15_outcomeW4 = 1 if districtW4 == 10786 
replace GB15_outcomeW4 = 2 if districtW4 == 10789 
replace GB15_outcomeW4 = 2 if districtW4 == 10787 
replace GB15_outcomeW4 = 2 if districtW4 == 10788 
replace GB15_outcomeW4 = 2 if districtW4 == 10790 
replace GB15_outcomeW4 = 1 if districtW4 == 10791 
replace GB15_outcomeW4 = 1 if districtW4 == 10792 
replace GB15_outcomeW4 = 4 if districtW4 == 20043 
replace GB15_outcomeW4 = 2 if districtW4 == 10793 
replace GB15_outcomeW4 = 2 if districtW4 == 10794 
replace GB15_outcomeW4 = 2 if districtW4 == 10795 
replace GB15_outcomeW4 = 2 if districtW4 == 10796 
replace GB15_outcomeW4 = 4 if districtW4 == 20044 
replace GB15_outcomeW4 = 2 if districtW4 == 30045 
replace GB15_outcomeW4 = 1 if districtW4 == 10797 
replace GB15_outcomeW4 = 1 if districtW4 == 10798 
replace GB15_outcomeW4 = 1 if districtW4 == 10799 
replace GB15_outcomeW4 = 2 if districtW4 == 10800 
replace GB15_outcomeW4 = 2 if districtW4 == 10801 
replace GB15_outcomeW4 = 1 if districtW4 == 10802 
replace GB15_outcomeW4 = 1 if districtW4 == 10803 
replace GB15_outcomeW4 = 1 if districtW4 == 10804 
replace GB15_outcomeW4 = 2 if districtW4 == 10805 
replace GB15_outcomeW4 = 1 if districtW4 == 10806 
replace GB15_outcomeW4 = 2 if districtW4 == 10807 
replace GB15_outcomeW4 = 2 if districtW4 == 10808 
replace GB15_outcomeW4 = 2 if districtW4 == 10809 
replace GB15_outcomeW4 = 2 if districtW4 == 10810 
replace GB15_outcomeW4 = 1 if districtW4 == 10811 
replace GB15_outcomeW4 = 1 if districtW4 == 10812 
replace GB15_outcomeW4 = 2 if districtW4 == 30071 
replace GB15_outcomeW4 = 1 if districtW4 == 10813 
replace GB15_outcomeW4 = 1 if districtW4 == 10814 
replace GB15_outcomeW4 = 2 if districtW4 == 10819 
replace GB15_outcomeW4 = 2 if districtW4 == 10820 
replace GB15_outcomeW4 = 1 if districtW4 == 10815 
replace GB15_outcomeW4 = 4 if districtW4 == 20045 
replace GB15_outcomeW4 = 1 if districtW4 == 10816 
replace GB15_outcomeW4 = 1 if districtW4 == 10817 
replace GB15_outcomeW4 = -9999 if districtW4 == 40010 
replace GB15_outcomeW4 = 1 if districtW4 == 10818 
replace GB15_outcomeW4 = 1 if districtW4 == 10821 
replace GB15_outcomeW4 = 1 if districtW4 == 10822 
replace GB15_outcomeW4 = 2 if districtW4 == 10823 
replace GB15_outcomeW4 = 1 if districtW4 == 10824 
replace GB15_outcomeW4 = 1 if districtW4 == 30054 
replace GB15_outcomeW4 = 1 if districtW4 == 30063 
replace GB15_outcomeW4 = 4 if districtW4 == 20046 
replace GB15_outcomeW4 = 1 if districtW4 == 10825 
replace GB15_outcomeW4 = 1 if districtW4 == 10826 
replace GB15_outcomeW4 = 4 if districtW4 == 20047 
replace GB15_outcomeW4 = 4 if districtW4 == 20027 
replace GB15_outcomeW4 = 2 if districtW4 == 30069 
replace GB15_outcomeW4 = 1 if districtW4 == 10829 
replace GB15_outcomeW4 = 1 if districtW4 == 10830 
replace GB15_outcomeW4 = 2 if districtW4 == 10834 
replace GB15_outcomeW4 = 2 if districtW4 == 10831 
replace GB15_outcomeW4 = 2 if districtW4 == 10832 
replace GB15_outcomeW4 = 2 if districtW4 == 10833 
replace GB15_outcomeW4 = 1 if districtW4 == 10827 
replace GB15_outcomeW4 = 1 if districtW4 == 10828 
replace GB15_outcomeW4 = 2 if districtW4 == 30055 
replace GB15_outcomeW4 = 2 if districtW4 == 30056 
replace GB15_outcomeW4 = -9999 if districtW4 == 40011 
replace GB15_outcomeW4 = 1 if districtW4 == 10835 
replace GB15_outcomeW4 = 2 if districtW4 == 10836 
replace GB15_outcomeW4 = 1 if districtW4 == 10861 
replace GB15_outcomeW4 = 1 if districtW4 == 10862 
replace GB15_outcomeW4 = -9999 if districtW4 == 40012 
replace GB15_outcomeW4 = 4 if districtW4 == 20048 
replace GB15_outcomeW4 = 1 if districtW4 == 10837 
replace GB15_outcomeW4 = 1 if districtW4 == 10838 
replace GB15_outcomeW4 = 1 if districtW4 == 10839 
replace GB15_outcomeW4 = -9999 if districtW4 == 40013 
replace GB15_outcomeW4 = 2 if districtW4 == 10840 
replace GB15_outcomeW4 = 1 if districtW4 == 10841 
replace GB15_outcomeW4 = 1 if districtW4 == 10842 
replace GB15_outcomeW4 = 2 if districtW4 == 10843 
replace GB15_outcomeW4 = 4 if districtW4 == 20049 
replace GB15_outcomeW4 = 1 if districtW4 == 10844 
replace GB15_outcomeW4 = 1 if districtW4 == 10845 
replace GB15_outcomeW4 = 1 if districtW4 == 10846 
replace GB15_outcomeW4 = 1 if districtW4 == 10847 
replace GB15_outcomeW4 = 3 if districtW4 == 10848 
replace GB15_outcomeW4 = 1 if districtW4 == 10849 
replace GB15_outcomeW4 = 1 if districtW4 == 10850 
replace GB15_outcomeW4 = 1 if districtW4 == 10851 
replace GB15_outcomeW4 = 1 if districtW4 == 10852 
replace GB15_outcomeW4 = 2 if districtW4 == 10853 
replace GB15_outcomeW4 = 1 if districtW4 == 10854 
replace GB15_outcomeW4 = 1 if districtW4 == 10855 
replace GB15_outcomeW4 = 2 if districtW4 == 10856 
replace GB15_outcomeW4 = 1 if districtW4 == 10857 
replace GB15_outcomeW4 = 1 if districtW4 == 10858 
replace GB15_outcomeW4 = 1 if districtW4 == 10859 
replace GB15_outcomeW4 = 1 if districtW4 == 10860 
replace GB15_outcomeW4 = 1 if districtW4 == 10863 
replace GB15_outcomeW4 = 2 if districtW4 == 10864 
replace GB15_outcomeW4 = 2 if districtW4 == 10865 
replace GB15_outcomeW4 = 2 if districtW4 == 10866 
replace GB15_outcomeW4 = 2 if districtW4 == 10867 
replace GB15_outcomeW4 = 1 if districtW4 == 10868 
replace GB15_outcomeW4 = 4 if districtW4 == 20050 
replace GB15_outcomeW4 = 2 if districtW4 == 30074 
replace GB15_outcomeW4 = 1 if districtW4 == 10869 
replace GB15_outcomeW4 = 2 if districtW4 == 10870 
replace GB15_outcomeW4 = 2 if districtW4 == 10871 
replace GB15_outcomeW4 = 3 if districtW4 == 20051 
replace GB15_outcomeW4 = 1 if districtW4 == 10872 
replace GB15_outcomeW4 = 2 if districtW4 == 10873 
replace GB15_outcomeW4 = 1 if districtW4 == 10874 
replace GB15_outcomeW4 = 4 if districtW4 == 20052 
replace GB15_outcomeW4 = 4 if districtW4 == 20053 
replace GB15_outcomeW4 = 1 if districtW4 == 10875 
replace GB15_outcomeW4 = 2 if districtW4 == 10876 
replace GB15_outcomeW4 = 1 if districtW4 == 10877 
replace GB15_outcomeW4 = 4 if districtW4 == 20054 
replace GB15_outcomeW4 = 1 if districtW4 == 10878 
replace GB15_outcomeW4 = 1 if districtW4 == 10879 
replace GB15_outcomeW4 = 1 if districtW4 == 10880 
replace GB15_outcomeW4 = 2 if districtW4 == 30075 
replace GB15_outcomeW4 = 1 if districtW4 == 10881 
replace GB15_outcomeW4 = 2 if districtW4 == 10882 
replace GB15_outcomeW4 = 1 if districtW4 == 10883 
replace GB15_outcomeW4 = 1 if districtW4 == 10884 
replace GB15_outcomeW4 = 1 if districtW4 == 30065 
replace GB15_outcomeW4 = 2 if districtW4 == 10885 
replace GB15_outcomeW4 = 1 if districtW4 == 10886 
replace GB15_outcomeW4 = 1 if districtW4 == 10887 
replace GB15_outcomeW4 = 1 if districtW4 == 10888 
replace GB15_outcomeW4 = 1 if districtW4 == 10889 
replace GB15_outcomeW4 = 1 if districtW4 == 10890 
replace GB15_outcomeW4 = 2 if districtW4 == 10891 
replace GB15_outcomeW4 = 1 if districtW4 == 10892 
replace GB15_outcomeW4 = 1 if districtW4 == 10893 
replace GB15_outcomeW4 = 2 if districtW4 == 30052 
replace GB15_outcomeW4 = 1 if districtW4 == 10894 
replace GB15_outcomeW4 = 1 if districtW4 == 10896 
replace GB15_outcomeW4 = 1 if districtW4 == 10895 
replace GB15_outcomeW4 = 2 if districtW4 == 10897 
replace GB15_outcomeW4 = 1 if districtW4 == 10898 
replace GB15_outcomeW4 = 1 if districtW4 == 10899 
replace GB15_outcomeW4 = 1 if districtW4 == 10900 
replace GB15_outcomeW4 = 1 if districtW4 == 10901 
replace GB15_outcomeW4 = 1 if districtW4 == 10902 
replace GB15_outcomeW4 = 4 if districtW4 == 20055 
replace GB15_outcomeW4 = 2 if districtW4 == 10904 
replace GB15_outcomeW4 = 2 if districtW4 == 10903 
replace GB15_outcomeW4 = 1 if districtW4 == 10905 
replace GB15_outcomeW4 = 1 if districtW4 == 10906 
replace GB15_outcomeW4 = 1 if districtW4 == 10907 
replace GB15_outcomeW4 = 1 if districtW4 == 10908 
replace GB15_outcomeW4 = 4 if districtW4 == 20056 
replace GB15_outcomeW4 = 1 if districtW4 == 10909 
replace GB15_outcomeW4 = 1 if districtW4 == 10910 
replace GB15_outcomeW4 = 2 if districtW4 == 10911 
replace GB15_outcomeW4 = 1 if districtW4 == 10912 
replace GB15_outcomeW4 = 1 if districtW4 == 10913 
replace GB15_outcomeW4 = 2 if districtW4 == 10914 
replace GB15_outcomeW4 = 2 if districtW4 == 10915 
replace GB15_outcomeW4 = 2 if districtW4 == 10916 
replace GB15_outcomeW4 = 1 if districtW4 == 10917 
replace GB15_outcomeW4 = 1 if districtW4 == 10918 
replace GB15_outcomeW4 = 2 if districtW4 == 10921 
replace GB15_outcomeW4 = 2 if districtW4 == 10919 
replace GB15_outcomeW4 = 3 if districtW4 == 10922 
replace GB15_outcomeW4 = 2 if districtW4 == 10923 
replace GB15_outcomeW4 = 2 if districtW4 == 10920 
replace GB15_outcomeW4 = 1 if districtW4 == 10924 
replace GB15_outcomeW4 = 1 if districtW4 == 10925 
replace GB15_outcomeW4 = 1 if districtW4 == 10926 
replace GB15_outcomeW4 = 1 if districtW4 == 10927 
replace GB15_outcomeW4 = 1 if districtW4 == 10928 
replace GB15_outcomeW4 = 1 if districtW4 == 10929 
replace GB15_outcomeW4 = 2 if districtW4 == 10930 
replace GB15_outcomeW4 = 1 if districtW4 == 10931 
replace GB15_outcomeW4 = 1 if districtW4 == 10932 
replace GB15_outcomeW4 = 1 if districtW4 == 10955 
replace GB15_outcomeW4 = 2 if districtW4 == 10956 
replace GB15_outcomeW4 = -9999 if districtW4 == 40014 
replace GB15_outcomeW4 = 1 if districtW4 == 10933 
replace GB15_outcomeW4 = 1 if districtW4 == 10934 
replace GB15_outcomeW4 = 1 if districtW4 == 10935 
replace GB15_outcomeW4 = 1 if districtW4 == 10936 
replace GB15_outcomeW4 = -9999 if districtW4 == 40015 
replace GB15_outcomeW4 = 1 if districtW4 == 10937 
replace GB15_outcomeW4 = 1 if districtW4 == 10938 
replace GB15_outcomeW4 = 1 if districtW4 == 10957 
replace GB15_outcomeW4 = 1 if districtW4 == 10939 
replace GB15_outcomeW4 = 1 if districtW4 == 10940 
replace GB15_outcomeW4 = 1 if districtW4 == 10941 
replace GB15_outcomeW4 = 1 if districtW4 == 10942 
replace GB15_outcomeW4 = 3 if districtW4 == 10958 
replace GB15_outcomeW4 = 1 if districtW4 == 10943 
replace GB15_outcomeW4 = 2 if districtW4 == 10944 
replace GB15_outcomeW4 = 1 if districtW4 == 10945 
replace GB15_outcomeW4 = 1 if districtW4 == 10946 
replace GB15_outcomeW4 = 1 if districtW4 == 10947 
replace GB15_outcomeW4 = 1 if districtW4 == 10948 
replace GB15_outcomeW4 = 1 if districtW4 == 10949 
replace GB15_outcomeW4 = 1 if districtW4 == 10950 
replace GB15_outcomeW4 = 1 if districtW4 == 10951 
replace GB15_outcomeW4 = 1 if districtW4 == 10952 
replace GB15_outcomeW4 = 1 if districtW4 == 10953 
replace GB15_outcomeW4 = 1 if districtW4 == 10954 
replace GB15_outcomeW4 = 1 if districtW4 == 10959 
replace GB15_outcomeW4 = 1 if districtW4 == 10965 
replace GB15_outcomeW4 = 1 if districtW4 == 10966 
replace GB15_outcomeW4 = 1 if districtW4 == 10960 
replace GB15_outcomeW4 = 2 if districtW4 == 10967 
replace GB15_outcomeW4 = 1 if districtW4 == 10961 
replace GB15_outcomeW4 = 1 if districtW4 == 10968 
replace GB15_outcomeW4 = 2 if districtW4 == 10962 
replace GB15_outcomeW4 = 2 if districtW4 == 10963 
replace GB15_outcomeW4 = 4 if districtW4 == 20057 
replace GB15_outcomeW4 = 1 if districtW4 == 10964 
replace GB15_outcomeW4 = 2 if districtW4 == 10969 
replace GB15_outcomeW4 = 2 if districtW4 == 10970 
replace GB15_outcomeW4 = 1 if districtW4 == 10971 
replace GB15_outcomeW4 = 2 if districtW4 == 10972 
replace GB15_outcomeW4 = 2 if districtW4 == 10973 
replace GB15_outcomeW4 = 2 if districtW4 == 10974 
replace GB15_outcomeW4 = 1 if districtW4 == 10975 
replace GB15_outcomeW4 = 1 if districtW4 == 10976 
replace GB15_outcomeW4 = -9999 if districtW4 == 40016 
replace GB15_outcomeW4 = 1 if districtW4 == 10977 
replace GB15_outcomeW4 = 2 if districtW4 == 10978 
replace GB15_outcomeW4 = 2 if districtW4 == 10979 
replace GB15_outcomeW4 = 1 if districtW4 == 10980 
replace GB15_outcomeW4 = 1 if districtW4 == 10981 
replace GB15_outcomeW4 = 2 if districtW4 == 10982 
replace GB15_outcomeW4 = 1 if districtW4 == 10983 
replace GB15_outcomeW4 = 1 if districtW4 == 10984 
replace GB15_outcomeW4 = 1 if districtW4 == 10985 
replace GB15_outcomeW4 = 2 if districtW4 == 30048 
replace GB15_outcomeW4 = 2 if districtW4 == 30047 
replace GB15_outcomeW4 = 1 if districtW4 == 10986 
replace GB15_outcomeW4 = 1 if districtW4 == 10987 
replace GB15_outcomeW4 = 1 if districtW4 == 10988 
replace GB15_outcomeW4 = 1 if districtW4 == 10989 
replace GB15_outcomeW4 = 1 if districtW4 == 10990 
replace GB15_outcomeW4 = 1 if districtW4 == 10991 
replace GB15_outcomeW4 = 1 if districtW4 == 10992 
replace GB15_outcomeW4 = 1 if districtW4 == 10993 
replace GB15_outcomeW4 = 1 if districtW4 == 10994 
replace GB15_outcomeW4 = 1 if districtW4 == 10995 
replace GB15_outcomeW4 = 1 if districtW4 == 10996 
replace GB15_outcomeW4 = 1 if districtW4 == 10997 
replace GB15_outcomeW4 = 2 if districtW4 == 10998 
replace GB15_outcomeW4 = 1 if districtW4 == 10999 
replace GB15_outcomeW4 = 2 if districtW4 == 30053 
replace GB15_outcomeW4 = 1 if districtW4 == 11000 
replace GB15_outcomeW4 = 1 if districtW4 == 11001 
replace GB15_outcomeW4 = 2 if districtW4 == 11002 
replace GB15_outcomeW4 = 1 if districtW4 == 11003 
replace GB15_outcomeW4 = 1 if districtW4 == 11004 
replace GB15_outcomeW4 = 1 if districtW4 == 11005 
replace GB15_outcomeW4 = 2 if districtW4 == 11006 
replace GB15_outcomeW4 = -9999 if districtW4 == 40017 
replace GB15_outcomeW4 = 1 if districtW4 == 11007 
replace GB15_outcomeW4 = 1 if districtW4 == 30060 
replace GB15_outcomeW4 = 1 if districtW4 == 30078 
replace GB15_outcomeW4 = 2 if districtW4 == 11008 
replace GB15_outcomeW4 = 2 if districtW4 == 11009 
replace GB15_outcomeW4 = 2 if districtW4 == 11010 
replace GB15_outcomeW4 = 2 if districtW4 == 11011 
replace GB15_outcomeW4 = 2 if districtW4 == 11012 
replace GB15_outcomeW4 = 2 if districtW4 == 11013 
replace GB15_outcomeW4 = 2 if districtW4 == 11014 
replace GB15_outcomeW4 = 1 if districtW4 == 11015 
replace GB15_outcomeW4 = 2 if districtW4 == 11016 
replace GB15_outcomeW4 = 2 if districtW4 == 11017 
replace GB15_outcomeW4 = 1 if districtW4 == 11018 
replace GB15_outcomeW4 = 1 if districtW4 == 11019 
replace GB15_outcomeW4 = 2 if districtW4 == 11020 
replace GB15_outcomeW4 = 1 if districtW4 == 11021 
replace GB15_outcomeW4 = 1 if districtW4 == 11022 
replace GB15_outcomeW4 = 1 if districtW4 == 11023 
replace GB15_outcomeW4 = 1 if districtW4 == 11024 
replace GB15_outcomeW4 = 1 if districtW4 == 11025 
replace GB15_outcomeW4 = 1 if districtW4 == 11026 
replace GB15_outcomeW4 = 1 if districtW4 == 11027 
replace GB15_outcomeW4 = 2 if districtW4 == 11028 
replace GB15_outcomeW4 = 4 if districtW4 == 20058 
replace GB15_outcomeW4 = 2 if districtW4 == 11029 
replace GB15_outcomeW4 = 2 if districtW4 == 11030 
replace GB15_outcomeW4 = 1 if districtW4 == 11031 
replace GB15_outcomeW4 = 4 if districtW4 == 20059 
replace GB15_outcomeW4 = 2 if districtW4 == 11032 
replace GB15_outcomeW4 = 2 if districtW4 == 11033 
replace GB15_outcomeW4 = 2 if districtW4 == 11036 
replace GB15_outcomeW4 = 3 if districtW4 == 11037 
replace GB15_outcomeW4 = 1 if districtW4 == 11038 
replace GB15_outcomeW4 = 1 if districtW4 == 11034 
replace GB15_outcomeW4 = -9999 if districtW4 == 40018 
replace GB15_outcomeW4 = 1 if districtW4 == 11035 
replace GB15_outcomeW4 = 2 if districtW4 == 11039 
replace GB15_outcomeW4 = 1 if districtW4 == 11040 
replace GB15_outcomeW4 = 1 if districtW4 == 11041 
replace GB15_outcomeW4 = 1 if districtW4 == 11042 
replace GB15_outcomeW4 = 2 if districtW4 == 11043 
replace GB15_outcomeW4 = 2 if districtW4 == 11044 
replace GB15_outcomeW4 = 1 if districtW4 == 11045 
replace GB15_outcomeW4 = 1 if districtW4 == 11046 
replace GB15_outcomeW4 = 1 if districtW4 == 11047 
replace GB15_outcomeW4 = 1 if districtW4 == 11048 
replace GB15_outcomeW4 = 2 if districtW4 == 11049 
replace GB15_outcomeW4 = 2 if districtW4 == 11050 
replace GB15_outcomeW4 = 2 if districtW4 == 11051 
replace GB15_outcomeW4 = 1 if districtW4 == 11052 
replace GB15_outcomeW4 = 2 if districtW4 == 11053 
replace GB15_outcomeW4 = 2 if districtW4 == 11054 
replace GB15_outcomeW4 = 1 if districtW4 == 11055 
replace GB15_outcomeW4 = 2 if districtW4 == 30044 
replace GB15_outcomeW4 = 1 if districtW4 == 11056 
replace GB15_outcomeW4 = 1 if districtW4 == 11057 
replace GB15_outcomeW4 = 1 if districtW4 == 11058 
replace GB15_outcomeW4 = 2 if districtW4 == 11059 
replace GB15_outcomeW4 = 1 if districtW4 == 11060 
replace GB15_outcomeW4 = 2 if districtW4 == 30041 
replace GB15_outcomeW4 = 2 if districtW4 == 11061 
replace GB15_outcomeW4 = 1 if districtW4 == 11062 

gen GB15_outcomeW5 = .

replace GB15_outcomeW5 = 2 if districtW5 == 30049
replace GB15_outcomeW5 = 1 if districtW5 == 30058
replace GB15_outcomeW5 = 4 if districtW5 == 20001
replace GB15_outcomeW5 = 4 if districtW5 == 20002
replace GB15_outcomeW5 = 4 if districtW5 == 20003
replace GB15_outcomeW5 = 1 if districtW5 == 10530
replace GB15_outcomeW5 = 1 if districtW5 == 10531
replace GB15_outcomeW5 = 1 if districtW5 == 10532
replace GB15_outcomeW5 = 2 if districtW5 == 30043
replace GB15_outcomeW5 = 1 if districtW5 == 10533
replace GB15_outcomeW5 = 4 if districtW5 == 20004
replace GB15_outcomeW5 = 5 if districtW5 == 30057
replace GB15_outcomeW5 = 4 if districtW5 == 20005
replace GB15_outcomeW5 = 1 if districtW5 == 10534
replace GB15_outcomeW5 = 2 if districtW5 == 10535
replace GB15_outcomeW5 = 1 if districtW5 == 10536
replace GB15_outcomeW5 = 2 if districtW5 == 10537
replace GB15_outcomeW5 = 1 if districtW5 == 10538
replace GB15_outcomeW5 = 4 if districtW5 == 20006
replace GB15_outcomeW5 = 1 if districtW5 == 10539
replace GB15_outcomeW5 = 4 if districtW5 == 20007
replace GB15_outcomeW5 = 2 if districtW5 == 10540
replace GB15_outcomeW5 = 2 if districtW5 == 10541
replace GB15_outcomeW5 = 2 if districtW5 == 10542
replace GB15_outcomeW5 = 2 if districtW5 == 10543
replace GB15_outcomeW5 = 1 if districtW5 == 10544
replace GB15_outcomeW5 = 1 if districtW5 == 10545
replace GB15_outcomeW5 = 2 if districtW5 == 10546
replace GB15_outcomeW5 = 1 if districtW5 == 10547
replace GB15_outcomeW5 = 2 if districtW5 == 10548
replace GB15_outcomeW5 = 1 if districtW5 == 10549
replace GB15_outcomeW5 = 1 if districtW5 == 10550
replace GB15_outcomeW5 = 1 if districtW5 == 10551
replace GB15_outcomeW5 = 1 if districtW5 == 10552
replace GB15_outcomeW5 = -9999 if districtW5 == 40001
replace GB15_outcomeW5 = -9999 if districtW5 == 40002
replace GB15_outcomeW5 = -9999 if districtW5 == 40003
replace GB15_outcomeW5 = -9999 if districtW5 == 40004
replace GB15_outcomeW5 = 2 if districtW5 == 10553
replace GB15_outcomeW5 = 4 if districtW5 == 20008
replace GB15_outcomeW5 = 1 if districtW5 == 10554
replace GB15_outcomeW5 = 2 if districtW5 == 10555
replace GB15_outcomeW5 = 1 if districtW5 == 10556
replace GB15_outcomeW5 = 1 if districtW5 == 10557
replace GB15_outcomeW5 = 1 if districtW5 == 10558
replace GB15_outcomeW5 = 2 if districtW5 == 10559
replace GB15_outcomeW5 = 2 if districtW5 == 10560
replace GB15_outcomeW5 = 2 if districtW5 == 10561
replace GB15_outcomeW5 = 2 if districtW5 == 10562
replace GB15_outcomeW5 = 2 if districtW5 == 10563
replace GB15_outcomeW5 = 2 if districtW5 == 10564
replace GB15_outcomeW5 = 2 if districtW5 == 10565
replace GB15_outcomeW5 = 2 if districtW5 == 10566
replace GB15_outcomeW5 = 2 if districtW5 == 10567
replace GB15_outcomeW5 = 2 if districtW5 == 10568
replace GB15_outcomeW5 = 2 if districtW5 == 10569
replace GB15_outcomeW5 = 2 if districtW5 == 10570
replace GB15_outcomeW5 = 2 if districtW5 == 10571
replace GB15_outcomeW5 = 1 if districtW5 == 10572
replace GB15_outcomeW5 = 2 if districtW5 == 10573
replace GB15_outcomeW5 = 2 if districtW5 == 30072
replace GB15_outcomeW5 = 2 if districtW5 == 10574
replace GB15_outcomeW5 = 2 if districtW5 == 10575
replace GB15_outcomeW5 = 1 if districtW5 == 10576
replace GB15_outcomeW5 = 2 if districtW5 == 10577
replace GB15_outcomeW5 = 2 if districtW5 == 10578
replace GB15_outcomeW5 = 2 if districtW5 == 10579
replace GB15_outcomeW5 = 1 if districtW5 == 10580
replace GB15_outcomeW5 = 2 if districtW5 == 10581
replace GB15_outcomeW5 = 1 if districtW5 == 10582
replace GB15_outcomeW5 = 1 if districtW5 == 10583
replace GB15_outcomeW5 = 1 if districtW5 == 10584
replace GB15_outcomeW5 = 1 if districtW5 == 10585
replace GB15_outcomeW5 = 1 if districtW5 == 10586
replace GB15_outcomeW5 = 2 if districtW5 == 10587
replace GB15_outcomeW5 = 2 if districtW5 == 10588
replace GB15_outcomeW5 = 2 if districtW5 == 10589
replace GB15_outcomeW5 = 1 if districtW5 == 10590
replace GB15_outcomeW5 = 1 if districtW5 == 30068
replace GB15_outcomeW5 = 2 if districtW5 == 10591
replace GB15_outcomeW5 = 2 if districtW5 == 10593
replace GB15_outcomeW5 = 2 if districtW5 == 10592
replace GB15_outcomeW5 = 1 if districtW5 == 10594
replace GB15_outcomeW5 = 2 if districtW5 == 30073
replace GB15_outcomeW5 = 1 if districtW5 == 10595
replace GB15_outcomeW5 = 1 if districtW5 == 10596
replace GB15_outcomeW5 = 1 if districtW5 == 10597
replace GB15_outcomeW5 = 7 if districtW5 == 10598
replace GB15_outcomeW5 = 2 if districtW5 == 10599
replace GB15_outcomeW5 = 1 if districtW5 == 10600
replace GB15_outcomeW5 = 2 if districtW5 == 10601
replace GB15_outcomeW5 = 2 if districtW5 == 10602
replace GB15_outcomeW5 = 1 if districtW5 == 10603
replace GB15_outcomeW5 = 1 if districtW5 == 10604
replace GB15_outcomeW5 = 1 if districtW5 == 10605
replace GB15_outcomeW5 = 1 if districtW5 == 10606
replace GB15_outcomeW5 = 1 if districtW5 == 10607
replace GB15_outcomeW5 = 1 if districtW5 == 10608
replace GB15_outcomeW5 = 2 if districtW5 == 10609
replace GB15_outcomeW5 = 1 if districtW5 == 10610
replace GB15_outcomeW5 = 1 if districtW5 == 10611
replace GB15_outcomeW5 = 2 if districtW5 == 10612
replace GB15_outcomeW5 = 1 if districtW5 == 10613
replace GB15_outcomeW5 = 2 if districtW5 == 30076
replace GB15_outcomeW5 = 4 if districtW5 == 20009
replace GB15_outcomeW5 = 1 if districtW5 == 10614
replace GB15_outcomeW5 = 2 if districtW5 == 10615
replace GB15_outcomeW5 = 1 if districtW5 == 10616
replace GB15_outcomeW5 = 2 if districtW5 == 10617
replace GB15_outcomeW5 = 1 if districtW5 == 10618
replace GB15_outcomeW5 = 1 if districtW5 == 10619
replace GB15_outcomeW5 = 2 if districtW5 == 30050
replace GB15_outcomeW5 = 1 if districtW5 == 30051
replace GB15_outcomeW5 = 2 if districtW5 == 30080
replace GB15_outcomeW5 = 2 if districtW5 == 30079
replace GB15_outcomeW5 = 1 if districtW5 == 10620
replace GB15_outcomeW5 = 5 if districtW5 == 30067
replace GB15_outcomeW5 = 1 if districtW5 == 30066
replace GB15_outcomeW5 = 3 if districtW5 == 10621
replace GB15_outcomeW5 = 1 if districtW5 == 10622
replace GB15_outcomeW5 = 4 if districtW5 == 20010
replace GB15_outcomeW5 = 1 if districtW5 == 10623
replace GB15_outcomeW5 = 1 if districtW5 == 10624
replace GB15_outcomeW5 = 3 if districtW5 == 30064
replace GB15_outcomeW5 = 1 if districtW5 == 10625
replace GB15_outcomeW5 = 1 if districtW5 == 10626
replace GB15_outcomeW5 = 1 if districtW5 == 10627
replace GB15_outcomeW5 = 1 if districtW5 == 10628
replace GB15_outcomeW5 = 1 if districtW5 == 10629
replace GB15_outcomeW5 = 1 if districtW5 == 10630
replace GB15_outcomeW5 = 1 if districtW5 == 10631
replace GB15_outcomeW5 = 2 if districtW5 == 10632
replace GB15_outcomeW5 = 1 if districtW5 == 10633
replace GB15_outcomeW5 = 1 if districtW5 == 10634
replace GB15_outcomeW5 = 1 if districtW5 == 10635
replace GB15_outcomeW5 = 1 if districtW5 == 10636
replace GB15_outcomeW5 = 2 if districtW5 == 10637
replace GB15_outcomeW5 = 1 if districtW5 == 10638
replace GB15_outcomeW5 = 1 if districtW5 == 10639
replace GB15_outcomeW5 = 2 if districtW5 == 10640
replace GB15_outcomeW5 = 2 if districtW5 == 10641
replace GB15_outcomeW5 = 6 if districtW5 == 10642
replace GB15_outcomeW5 = 1 if districtW5 == 10643
replace GB15_outcomeW5 = 2 if districtW5 == 30062
replace GB15_outcomeW5 = 1 if districtW5 == 30059
replace GB15_outcomeW5 = 4 if districtW5 == 20011
replace GB15_outcomeW5 = 1 if districtW5 == 10644
replace GB15_outcomeW5 = 1 if districtW5 == 10645
replace GB15_outcomeW5 = 1 if districtW5 == 10646
replace GB15_outcomeW5 = 2 if districtW5 == 10647
replace GB15_outcomeW5 = 1 if districtW5 == 10648
replace GB15_outcomeW5 = 2 if districtW5 == 10649
replace GB15_outcomeW5 = 2 if districtW5 == 10650
replace GB15_outcomeW5 = 2 if districtW5 == 10651
replace GB15_outcomeW5 = 1 if districtW5 == 10652
replace GB15_outcomeW5 = 1 if districtW5 == 10653
replace GB15_outcomeW5 = 1 if districtW5 == 10654
replace GB15_outcomeW5 = 2 if districtW5 == 10655
replace GB15_outcomeW5 = 1 if districtW5 == 10656
replace GB15_outcomeW5 = 4 if districtW5 == 20012
replace GB15_outcomeW5 = 2 if districtW5 == 30070
replace GB15_outcomeW5 = 2 if districtW5 == 10657
replace GB15_outcomeW5 = 2 if districtW5 == 10658
replace GB15_outcomeW5 = 1 if districtW5 == 10659
replace GB15_outcomeW5 = 1 if districtW5 == 10660
replace GB15_outcomeW5 = 2 if districtW5 == 30042
replace GB15_outcomeW5 = 2 if districtW5 == 10661
replace GB15_outcomeW5 = 1 if districtW5 == 10662
replace GB15_outcomeW5 = 1 if districtW5 == 10664
replace GB15_outcomeW5 = 2 if districtW5 == 10663
replace GB15_outcomeW5 = 1 if districtW5 == 10665
replace GB15_outcomeW5 = 2 if districtW5 == 10666
replace GB15_outcomeW5 = 2 if districtW5 == 10668
replace GB15_outcomeW5 = 2 if districtW5 == 10669
replace GB15_outcomeW5 = 2 if districtW5 == 10667
replace GB15_outcomeW5 = 1 if districtW5 == 10670
replace GB15_outcomeW5 = 2 if districtW5 == 10671
replace GB15_outcomeW5 = 1 if districtW5 == 10672
replace GB15_outcomeW5 = 2 if districtW5 == 10673
replace GB15_outcomeW5 = 4 if districtW5 == 20013
replace GB15_outcomeW5 = 1 if districtW5 == 20014
replace GB15_outcomeW5 = 4 if districtW5 == 20015
replace GB15_outcomeW5 = 4 if districtW5 == 20016
replace GB15_outcomeW5 = 4 if districtW5 == 20017
replace GB15_outcomeW5 = 5 if districtW5 == 30061
replace GB15_outcomeW5 = 2 if districtW5 == 10674
replace GB15_outcomeW5 = 2 if districtW5 == 10675
replace GB15_outcomeW5 = 2 if districtW5 == 10676
replace GB15_outcomeW5 = 2 if districtW5 == 10677
replace GB15_outcomeW5 = -9999 if districtW5 == 40005
replace GB15_outcomeW5 = 1 if districtW5 == 10684
replace GB15_outcomeW5 = 1 if districtW5 == 10678
replace GB15_outcomeW5 = 4 if districtW5 == 20018
replace GB15_outcomeW5 = 2 if districtW5 == 10679
replace GB15_outcomeW5 = 1 if districtW5 == 10680
replace GB15_outcomeW5 = 4 if districtW5 == 20019
replace GB15_outcomeW5 = 1 if districtW5 == 10685
replace GB15_outcomeW5 = -9999 if districtW5 == 40006
replace GB15_outcomeW5 = 4 if districtW5 == 20020
replace GB15_outcomeW5 = 4 if districtW5 == 20021
replace GB15_outcomeW5 = 1 if districtW5 == 10681
replace GB15_outcomeW5 = 1 if districtW5 == 10682
replace GB15_outcomeW5 = 1 if districtW5 == 10683
replace GB15_outcomeW5 = 1 if districtW5 == 10686
replace GB15_outcomeW5 = 4 if districtW5 == 20022
replace GB15_outcomeW5 = 4 if districtW5 == 20023
replace GB15_outcomeW5 = 2 if districtW5 == 20024
replace GB15_outcomeW5 = 4 if districtW5 == 20025
replace GB15_outcomeW5 = 4 if districtW5 == 20026
replace GB15_outcomeW5 = 2 if districtW5 == 10687
replace GB15_outcomeW5 = 2 if districtW5 == 10688
replace GB15_outcomeW5 = 1 if districtW5 == 10689
replace GB15_outcomeW5 = 2 if districtW5 == 10690
replace GB15_outcomeW5 = 2 if districtW5 == 10691
replace GB15_outcomeW5 = 1 if districtW5 == 10692
replace GB15_outcomeW5 = 1 if districtW5 == 10693
replace GB15_outcomeW5 = 1 if districtW5 == 10694
replace GB15_outcomeW5 = 1 if districtW5 == 10695
replace GB15_outcomeW5 = 2 if districtW5 == 10696
replace GB15_outcomeW5 = 1 if districtW5 == 10697
replace GB15_outcomeW5 = 2 if districtW5 == 10698
replace GB15_outcomeW5 = 4 if districtW5 == 20028
replace GB15_outcomeW5 = 1 if districtW5 == 10699
replace GB15_outcomeW5 = 1 if districtW5 == 10700
replace GB15_outcomeW5 = 2 if districtW5 == 10701
replace GB15_outcomeW5 = -9999 if districtW5 == 40007
replace GB15_outcomeW5 = 1 if districtW5 == 10702
replace GB15_outcomeW5 = 1 if districtW5 == 10703
replace GB15_outcomeW5 = 1 if districtW5 == 10704
replace GB15_outcomeW5 = 1 if districtW5 == 10705
replace GB15_outcomeW5 = -9999 if districtW5 == 40008
replace GB15_outcomeW5 = 1 if districtW5 == 10706
replace GB15_outcomeW5 = 1 if districtW5 == 10707
replace GB15_outcomeW5 = 2 if districtW5 == 10708
replace GB15_outcomeW5 = 2 if districtW5 == 10709
replace GB15_outcomeW5 = 2 if districtW5 == 10710
replace GB15_outcomeW5 = 1 if districtW5 == 10711
replace GB15_outcomeW5 = 4 if districtW5 == 20029
replace GB15_outcomeW5 = 4 if districtW5 == 20030
replace GB15_outcomeW5 = 4 if districtW5 == 20031
replace GB15_outcomeW5 = 4 if districtW5 == 20032
replace GB15_outcomeW5 = 4 if districtW5 == 20033
replace GB15_outcomeW5 = 4 if districtW5 == 20034
replace GB15_outcomeW5 = 4 if districtW5 == 20035
replace GB15_outcomeW5 = 4 if districtW5 == 20036
replace GB15_outcomeW5 = 1 if districtW5 == 10712
replace GB15_outcomeW5 = 4 if districtW5 == 20037
replace GB15_outcomeW5 = 1 if districtW5 == 10713
replace GB15_outcomeW5 = 1 if districtW5 == 30046
replace GB15_outcomeW5 = 1 if districtW5 == 10714
replace GB15_outcomeW5 = 1 if districtW5 == 10715
replace GB15_outcomeW5 = 2 if districtW5 == 10716
replace GB15_outcomeW5 = 1 if districtW5 == 10717
replace GB15_outcomeW5 = 2 if districtW5 == 10718
replace GB15_outcomeW5 = 1 if districtW5 == 10719
replace GB15_outcomeW5 = 2 if districtW5 == 10720
replace GB15_outcomeW5 = 2 if districtW5 == 10721
replace GB15_outcomeW5 = 1 if districtW5 == 10722
replace GB15_outcomeW5 = 2 if districtW5 == 10723
replace GB15_outcomeW5 = 1 if districtW5 == 10724
replace GB15_outcomeW5 = 2 if districtW5 == 10725
replace GB15_outcomeW5 = 2 if districtW5 == 10726
replace GB15_outcomeW5 = 2 if districtW5 == 10727
replace GB15_outcomeW5 = 1 if districtW5 == 10728
replace GB15_outcomeW5 = 1 if districtW5 == 10729
replace GB15_outcomeW5 = 1 if districtW5 == 10730
replace GB15_outcomeW5 = 1 if districtW5 == 10731
replace GB15_outcomeW5 = 2 if districtW5 == 10732
replace GB15_outcomeW5 = 2 if districtW5 == 10733
replace GB15_outcomeW5 = 1 if districtW5 == 10734
replace GB15_outcomeW5 = 1 if districtW5 == 10735
replace GB15_outcomeW5 = 1 if districtW5 == 10736
replace GB15_outcomeW5 = 2 if districtW5 == 10737
replace GB15_outcomeW5 = 1 if districtW5 == 10738
replace GB15_outcomeW5 = 1 if districtW5 == 10739
replace GB15_outcomeW5 = 2 if districtW5 == 10740
replace GB15_outcomeW5 = 1 if districtW5 == 10741
replace GB15_outcomeW5 = 1 if districtW5 == 10742
replace GB15_outcomeW5 = 1 if districtW5 == 10743
replace GB15_outcomeW5 = 1 if districtW5 == 10744
replace GB15_outcomeW5 = 1 if districtW5 == 10745
replace GB15_outcomeW5 = 1 if districtW5 == 10746
replace GB15_outcomeW5 = 2 if districtW5 == 10747
replace GB15_outcomeW5 = 1 if districtW5 == 10748
replace GB15_outcomeW5 = 1 if districtW5 == 10749
replace GB15_outcomeW5 = 2 if districtW5 == 10750
replace GB15_outcomeW5 = 1 if districtW5 == 10751
replace GB15_outcomeW5 = 2 if districtW5 == 10752
replace GB15_outcomeW5 = 1 if districtW5 == 10753
replace GB15_outcomeW5 = 2 if districtW5 == 10754
replace GB15_outcomeW5 = 2 if districtW5 == 10755
replace GB15_outcomeW5 = 2 if districtW5 == 10756
replace GB15_outcomeW5 = 1 if districtW5 == 10757
replace GB15_outcomeW5 = 2 if districtW5 == 10758
replace GB15_outcomeW5 = 2 if districtW5 == 10759
replace GB15_outcomeW5 = 2 if districtW5 == 10760
replace GB15_outcomeW5 = 4 if districtW5 == 20038
replace GB15_outcomeW5 = 4 if districtW5 == 20039
replace GB15_outcomeW5 = 1 if districtW5 == 10761
replace GB15_outcomeW5 = 1 if districtW5 == 10762
replace GB15_outcomeW5 = 2 if districtW5 == 10763
replace GB15_outcomeW5 = 2 if districtW5 == 10764
replace GB15_outcomeW5 = 2 if districtW5 == 30077
replace GB15_outcomeW5 = 2 if districtW5 == 10765
replace GB15_outcomeW5 = 1 if districtW5 == 10766
replace GB15_outcomeW5 = 1 if districtW5 == 10767
replace GB15_outcomeW5 = 1 if districtW5 == 10768
replace GB15_outcomeW5 = 1 if districtW5 == 10769
replace GB15_outcomeW5 = 4 if districtW5 == 20040
replace GB15_outcomeW5 = 1 if districtW5 == 10770
replace GB15_outcomeW5 = 2 if districtW5 == 10771
replace GB15_outcomeW5 = 2 if districtW5 == 10772
replace GB15_outcomeW5 = 2 if districtW5 == 10773
replace GB15_outcomeW5 = 1 if districtW5 == 10774
replace GB15_outcomeW5 = 4 if districtW5 == 20041
replace GB15_outcomeW5 = 2 if districtW5 == 10775
replace GB15_outcomeW5 = -9999 if districtW5 == 40009
replace GB15_outcomeW5 = 4 if districtW5 == 20042
replace GB15_outcomeW5 = 2 if districtW5 == 10776
replace GB15_outcomeW5 = 2 if districtW5 == 10777
replace GB15_outcomeW5 = 2 if districtW5 == 10778
replace GB15_outcomeW5 = 2 if districtW5 == 10779
replace GB15_outcomeW5 = 3 if districtW5 == 10780
replace GB15_outcomeW5 = 2 if districtW5 == 10781
replace GB15_outcomeW5 = 2 if districtW5 == 10782
replace GB15_outcomeW5 = 2 if districtW5 == 10783
replace GB15_outcomeW5 = 2 if districtW5 == 10784
replace GB15_outcomeW5 = 2 if districtW5 == 10785
replace GB15_outcomeW5 = 1 if districtW5 == 10786
replace GB15_outcomeW5 = 2 if districtW5 == 10789
replace GB15_outcomeW5 = 2 if districtW5 == 10787
replace GB15_outcomeW5 = 2 if districtW5 == 10788
replace GB15_outcomeW5 = 2 if districtW5 == 10790
replace GB15_outcomeW5 = 1 if districtW5 == 10791
replace GB15_outcomeW5 = 1 if districtW5 == 10792
replace GB15_outcomeW5 = 4 if districtW5 == 20043
replace GB15_outcomeW5 = 2 if districtW5 == 10793
replace GB15_outcomeW5 = 2 if districtW5 == 10794
replace GB15_outcomeW5 = 2 if districtW5 == 10795
replace GB15_outcomeW5 = 2 if districtW5 == 10796
replace GB15_outcomeW5 = 4 if districtW5 == 20044
replace GB15_outcomeW5 = 2 if districtW5 == 30045
replace GB15_outcomeW5 = 1 if districtW5 == 10797
replace GB15_outcomeW5 = 1 if districtW5 == 10798
replace GB15_outcomeW5 = 1 if districtW5 == 10799
replace GB15_outcomeW5 = 2 if districtW5 == 10800
replace GB15_outcomeW5 = 2 if districtW5 == 10801
replace GB15_outcomeW5 = 1 if districtW5 == 10802
replace GB15_outcomeW5 = 1 if districtW5 == 10803
replace GB15_outcomeW5 = 1 if districtW5 == 10804
replace GB15_outcomeW5 = 2 if districtW5 == 10805
replace GB15_outcomeW5 = 1 if districtW5 == 10806
replace GB15_outcomeW5 = 2 if districtW5 == 10807
replace GB15_outcomeW5 = 2 if districtW5 == 10808
replace GB15_outcomeW5 = 2 if districtW5 == 10809
replace GB15_outcomeW5 = 2 if districtW5 == 10810
replace GB15_outcomeW5 = 1 if districtW5 == 10811
replace GB15_outcomeW5 = 1 if districtW5 == 10812
replace GB15_outcomeW5 = 2 if districtW5 == 30071
replace GB15_outcomeW5 = 1 if districtW5 == 10813
replace GB15_outcomeW5 = 1 if districtW5 == 10814
replace GB15_outcomeW5 = 2 if districtW5 == 10819
replace GB15_outcomeW5 = 2 if districtW5 == 10820
replace GB15_outcomeW5 = 1 if districtW5 == 10815
replace GB15_outcomeW5 = 4 if districtW5 == 20045
replace GB15_outcomeW5 = 1 if districtW5 == 10816
replace GB15_outcomeW5 = 1 if districtW5 == 10817
replace GB15_outcomeW5 = -9999 if districtW5 == 40010
replace GB15_outcomeW5 = 1 if districtW5 == 10818
replace GB15_outcomeW5 = 1 if districtW5 == 10821
replace GB15_outcomeW5 = 1 if districtW5 == 10822
replace GB15_outcomeW5 = 2 if districtW5 == 10823
replace GB15_outcomeW5 = 1 if districtW5 == 10824
replace GB15_outcomeW5 = 1 if districtW5 == 30054
replace GB15_outcomeW5 = 1 if districtW5 == 30063
replace GB15_outcomeW5 = 4 if districtW5 == 20046
replace GB15_outcomeW5 = 1 if districtW5 == 10825
replace GB15_outcomeW5 = 1 if districtW5 == 10826
replace GB15_outcomeW5 = 4 if districtW5 == 20047
replace GB15_outcomeW5 = 4 if districtW5 == 20027
replace GB15_outcomeW5 = 2 if districtW5 == 30069
replace GB15_outcomeW5 = 1 if districtW5 == 10829
replace GB15_outcomeW5 = 1 if districtW5 == 10830
replace GB15_outcomeW5 = 2 if districtW5 == 10834
replace GB15_outcomeW5 = 2 if districtW5 == 10831
replace GB15_outcomeW5 = 2 if districtW5 == 10832
replace GB15_outcomeW5 = 2 if districtW5 == 10833
replace GB15_outcomeW5 = 1 if districtW5 == 10827
replace GB15_outcomeW5 = 1 if districtW5 == 10828
replace GB15_outcomeW5 = 2 if districtW5 == 30055
replace GB15_outcomeW5 = 2 if districtW5 == 30056
replace GB15_outcomeW5 = -9999 if districtW5 == 40011
replace GB15_outcomeW5 = 1 if districtW5 == 10835
replace GB15_outcomeW5 = 2 if districtW5 == 10836
replace GB15_outcomeW5 = 1 if districtW5 == 10861
replace GB15_outcomeW5 = 1 if districtW5 == 10862
replace GB15_outcomeW5 = -9999 if districtW5 == 40012
replace GB15_outcomeW5 = 4 if districtW5 == 20048
replace GB15_outcomeW5 = 1 if districtW5 == 10837
replace GB15_outcomeW5 = 1 if districtW5 == 10838
replace GB15_outcomeW5 = 1 if districtW5 == 10839
replace GB15_outcomeW5 = -9999 if districtW5 == 40013
replace GB15_outcomeW5 = 2 if districtW5 == 10840
replace GB15_outcomeW5 = 1 if districtW5 == 10841
replace GB15_outcomeW5 = 1 if districtW5 == 10842
replace GB15_outcomeW5 = 2 if districtW5 == 10843
replace GB15_outcomeW5 = 4 if districtW5 == 20049
replace GB15_outcomeW5 = 1 if districtW5 == 10844
replace GB15_outcomeW5 = 1 if districtW5 == 10845
replace GB15_outcomeW5 = 1 if districtW5 == 10846
replace GB15_outcomeW5 = 1 if districtW5 == 10847
replace GB15_outcomeW5 = 3 if districtW5 == 10848
replace GB15_outcomeW5 = 1 if districtW5 == 10849
replace GB15_outcomeW5 = 1 if districtW5 == 10850
replace GB15_outcomeW5 = 1 if districtW5 == 10851
replace GB15_outcomeW5 = 1 if districtW5 == 10852
replace GB15_outcomeW5 = 2 if districtW5 == 10853
replace GB15_outcomeW5 = 1 if districtW5 == 10854
replace GB15_outcomeW5 = 1 if districtW5 == 10855
replace GB15_outcomeW5 = 2 if districtW5 == 10856
replace GB15_outcomeW5 = 1 if districtW5 == 10857
replace GB15_outcomeW5 = 1 if districtW5 == 10858
replace GB15_outcomeW5 = 1 if districtW5 == 10859
replace GB15_outcomeW5 = 1 if districtW5 == 10860
replace GB15_outcomeW5 = 1 if districtW5 == 10863
replace GB15_outcomeW5 = 2 if districtW5 == 10864
replace GB15_outcomeW5 = 2 if districtW5 == 10865
replace GB15_outcomeW5 = 2 if districtW5 == 10866
replace GB15_outcomeW5 = 2 if districtW5 == 10867
replace GB15_outcomeW5 = 1 if districtW5 == 10868
replace GB15_outcomeW5 = 4 if districtW5 == 20050
replace GB15_outcomeW5 = 2 if districtW5 == 30074
replace GB15_outcomeW5 = 1 if districtW5 == 10869
replace GB15_outcomeW5 = 2 if districtW5 == 10870
replace GB15_outcomeW5 = 2 if districtW5 == 10871
replace GB15_outcomeW5 = 3 if districtW5 == 20051
replace GB15_outcomeW5 = 1 if districtW5 == 10872
replace GB15_outcomeW5 = 2 if districtW5 == 10873
replace GB15_outcomeW5 = 1 if districtW5 == 10874
replace GB15_outcomeW5 = 4 if districtW5 == 20052
replace GB15_outcomeW5 = 4 if districtW5 == 20053
replace GB15_outcomeW5 = 1 if districtW5 == 10875
replace GB15_outcomeW5 = 2 if districtW5 == 10876
replace GB15_outcomeW5 = 1 if districtW5 == 10877
replace GB15_outcomeW5 = 4 if districtW5 == 20054
replace GB15_outcomeW5 = 1 if districtW5 == 10878
replace GB15_outcomeW5 = 1 if districtW5 == 10879
replace GB15_outcomeW5 = 1 if districtW5 == 10880
replace GB15_outcomeW5 = 2 if districtW5 == 30075
replace GB15_outcomeW5 = 1 if districtW5 == 10881
replace GB15_outcomeW5 = 2 if districtW5 == 10882
replace GB15_outcomeW5 = 1 if districtW5 == 10883
replace GB15_outcomeW5 = 1 if districtW5 == 10884
replace GB15_outcomeW5 = 1 if districtW5 == 30065
replace GB15_outcomeW5 = 2 if districtW5 == 10885
replace GB15_outcomeW5 = 1 if districtW5 == 10886
replace GB15_outcomeW5 = 1 if districtW5 == 10887
replace GB15_outcomeW5 = 1 if districtW5 == 10888
replace GB15_outcomeW5 = 1 if districtW5 == 10889
replace GB15_outcomeW5 = 1 if districtW5 == 10890
replace GB15_outcomeW5 = 2 if districtW5 == 10891
replace GB15_outcomeW5 = 1 if districtW5 == 10892
replace GB15_outcomeW5 = 1 if districtW5 == 10893
replace GB15_outcomeW5 = 2 if districtW5 == 30052
replace GB15_outcomeW5 = 1 if districtW5 == 10894
replace GB15_outcomeW5 = 1 if districtW5 == 10896
replace GB15_outcomeW5 = 1 if districtW5 == 10895
replace GB15_outcomeW5 = 2 if districtW5 == 10897
replace GB15_outcomeW5 = 1 if districtW5 == 10898
replace GB15_outcomeW5 = 1 if districtW5 == 10899
replace GB15_outcomeW5 = 1 if districtW5 == 10900
replace GB15_outcomeW5 = 1 if districtW5 == 10901
replace GB15_outcomeW5 = 1 if districtW5 == 10902
replace GB15_outcomeW5 = 4 if districtW5 == 20055
replace GB15_outcomeW5 = 2 if districtW5 == 10904
replace GB15_outcomeW5 = 2 if districtW5 == 10903
replace GB15_outcomeW5 = 1 if districtW5 == 10905
replace GB15_outcomeW5 = 1 if districtW5 == 10906
replace GB15_outcomeW5 = 1 if districtW5 == 10907
replace GB15_outcomeW5 = 1 if districtW5 == 10908
replace GB15_outcomeW5 = 4 if districtW5 == 20056
replace GB15_outcomeW5 = 1 if districtW5 == 10909
replace GB15_outcomeW5 = 1 if districtW5 == 10910
replace GB15_outcomeW5 = 2 if districtW5 == 10911
replace GB15_outcomeW5 = 1 if districtW5 == 10912
replace GB15_outcomeW5 = 1 if districtW5 == 10913
replace GB15_outcomeW5 = 2 if districtW5 == 10914
replace GB15_outcomeW5 = 2 if districtW5 == 10915
replace GB15_outcomeW5 = 2 if districtW5 == 10916
replace GB15_outcomeW5 = 1 if districtW5 == 10917
replace GB15_outcomeW5 = 1 if districtW5 == 10918
replace GB15_outcomeW5 = 2 if districtW5 == 10921
replace GB15_outcomeW5 = 2 if districtW5 == 10919
replace GB15_outcomeW5 = 3 if districtW5 == 10922
replace GB15_outcomeW5 = 2 if districtW5 == 10923
replace GB15_outcomeW5 = 2 if districtW5 == 10920
replace GB15_outcomeW5 = 1 if districtW5 == 10924
replace GB15_outcomeW5 = 1 if districtW5 == 10925
replace GB15_outcomeW5 = 1 if districtW5 == 10926
replace GB15_outcomeW5 = 1 if districtW5 == 10927
replace GB15_outcomeW5 = 1 if districtW5 == 10928
replace GB15_outcomeW5 = 1 if districtW5 == 10929
replace GB15_outcomeW5 = 2 if districtW5 == 10930
replace GB15_outcomeW5 = 1 if districtW5 == 10931
replace GB15_outcomeW5 = 1 if districtW5 == 10932
replace GB15_outcomeW5 = 1 if districtW5 == 10955
replace GB15_outcomeW5 = 2 if districtW5 == 10956
replace GB15_outcomeW5 = -9999 if districtW5 == 40014
replace GB15_outcomeW5 = 1 if districtW5 == 10933
replace GB15_outcomeW5 = 1 if districtW5 == 10934
replace GB15_outcomeW5 = 1 if districtW5 == 10935
replace GB15_outcomeW5 = 1 if districtW5 == 10936
replace GB15_outcomeW5 = -9999 if districtW5 == 40015
replace GB15_outcomeW5 = 1 if districtW5 == 10937
replace GB15_outcomeW5 = 1 if districtW5 == 10938
replace GB15_outcomeW5 = 1 if districtW5 == 10957
replace GB15_outcomeW5 = 1 if districtW5 == 10939
replace GB15_outcomeW5 = 1 if districtW5 == 10940
replace GB15_outcomeW5 = 1 if districtW5 == 10941
replace GB15_outcomeW5 = 1 if districtW5 == 10942
replace GB15_outcomeW5 = 3 if districtW5 == 10958
replace GB15_outcomeW5 = 1 if districtW5 == 10943
replace GB15_outcomeW5 = 2 if districtW5 == 10944
replace GB15_outcomeW5 = 1 if districtW5 == 10945
replace GB15_outcomeW5 = 1 if districtW5 == 10946
replace GB15_outcomeW5 = 1 if districtW5 == 10947
replace GB15_outcomeW5 = 1 if districtW5 == 10948
replace GB15_outcomeW5 = 1 if districtW5 == 10949
replace GB15_outcomeW5 = 1 if districtW5 == 10950
replace GB15_outcomeW5 = 1 if districtW5 == 10951
replace GB15_outcomeW5 = 1 if districtW5 == 10952
replace GB15_outcomeW5 = 1 if districtW5 == 10953
replace GB15_outcomeW5 = 1 if districtW5 == 10954
replace GB15_outcomeW5 = 1 if districtW5 == 10959
replace GB15_outcomeW5 = 1 if districtW5 == 10965
replace GB15_outcomeW5 = 1 if districtW5 == 10966
replace GB15_outcomeW5 = 1 if districtW5 == 10960
replace GB15_outcomeW5 = 2 if districtW5 == 10967
replace GB15_outcomeW5 = 1 if districtW5 == 10961
replace GB15_outcomeW5 = 1 if districtW5 == 10968
replace GB15_outcomeW5 = 2 if districtW5 == 10962
replace GB15_outcomeW5 = 2 if districtW5 == 10963
replace GB15_outcomeW5 = 4 if districtW5 == 20057
replace GB15_outcomeW5 = 1 if districtW5 == 10964
replace GB15_outcomeW5 = 2 if districtW5 == 10969
replace GB15_outcomeW5 = 2 if districtW5 == 10970
replace GB15_outcomeW5 = 1 if districtW5 == 10971
replace GB15_outcomeW5 = 2 if districtW5 == 10972
replace GB15_outcomeW5 = 2 if districtW5 == 10973
replace GB15_outcomeW5 = 2 if districtW5 == 10974
replace GB15_outcomeW5 = 1 if districtW5 == 10975
replace GB15_outcomeW5 = 1 if districtW5 == 10976
replace GB15_outcomeW5 = -9999 if districtW5 == 40016
replace GB15_outcomeW5 = 1 if districtW5 == 10977
replace GB15_outcomeW5 = 2 if districtW5 == 10978
replace GB15_outcomeW5 = 2 if districtW5 == 10979
replace GB15_outcomeW5 = 1 if districtW5 == 10980
replace GB15_outcomeW5 = 1 if districtW5 == 10981
replace GB15_outcomeW5 = 2 if districtW5 == 10982
replace GB15_outcomeW5 = 1 if districtW5 == 10983
replace GB15_outcomeW5 = 1 if districtW5 == 10984
replace GB15_outcomeW5 = 1 if districtW5 == 10985
replace GB15_outcomeW5 = 2 if districtW5 == 30048
replace GB15_outcomeW5 = 2 if districtW5 == 30047
replace GB15_outcomeW5 = 1 if districtW5 == 10986
replace GB15_outcomeW5 = 1 if districtW5 == 10987
replace GB15_outcomeW5 = 1 if districtW5 == 10988
replace GB15_outcomeW5 = 1 if districtW5 == 10989
replace GB15_outcomeW5 = 1 if districtW5 == 10990
replace GB15_outcomeW5 = 1 if districtW5 == 10991
replace GB15_outcomeW5 = 1 if districtW5 == 10992
replace GB15_outcomeW5 = 1 if districtW5 == 10993
replace GB15_outcomeW5 = 1 if districtW5 == 10994
replace GB15_outcomeW5 = 1 if districtW5 == 10995
replace GB15_outcomeW5 = 1 if districtW5 == 10996
replace GB15_outcomeW5 = 1 if districtW5 == 10997
replace GB15_outcomeW5 = 2 if districtW5 == 10998
replace GB15_outcomeW5 = 1 if districtW5 == 10999
replace GB15_outcomeW5 = 2 if districtW5 == 30053
replace GB15_outcomeW5 = 1 if districtW5 == 11000
replace GB15_outcomeW5 = 1 if districtW5 == 11001
replace GB15_outcomeW5 = 2 if districtW5 == 11002
replace GB15_outcomeW5 = 1 if districtW5 == 11003
replace GB15_outcomeW5 = 1 if districtW5 == 11004
replace GB15_outcomeW5 = 1 if districtW5 == 11005
replace GB15_outcomeW5 = 2 if districtW5 == 11006
replace GB15_outcomeW5 = -9999 if districtW5 == 40017
replace GB15_outcomeW5 = 1 if districtW5 == 11007
replace GB15_outcomeW5 = 1 if districtW5 == 30060
replace GB15_outcomeW5 = 1 if districtW5 == 30078
replace GB15_outcomeW5 = 2 if districtW5 == 11008
replace GB15_outcomeW5 = 2 if districtW5 == 11009
replace GB15_outcomeW5 = 2 if districtW5 == 11010
replace GB15_outcomeW5 = 2 if districtW5 == 11011
replace GB15_outcomeW5 = 2 if districtW5 == 11012
replace GB15_outcomeW5 = 2 if districtW5 == 11013
replace GB15_outcomeW5 = 2 if districtW5 == 11014
replace GB15_outcomeW5 = 1 if districtW5 == 11015
replace GB15_outcomeW5 = 2 if districtW5 == 11016
replace GB15_outcomeW5 = 2 if districtW5 == 11017
replace GB15_outcomeW5 = 1 if districtW5 == 11018
replace GB15_outcomeW5 = 1 if districtW5 == 11019
replace GB15_outcomeW5 = 2 if districtW5 == 11020
replace GB15_outcomeW5 = 1 if districtW5 == 11021
replace GB15_outcomeW5 = 1 if districtW5 == 11022
replace GB15_outcomeW5 = 1 if districtW5 == 11023
replace GB15_outcomeW5 = 1 if districtW5 == 11024
replace GB15_outcomeW5 = 1 if districtW5 == 11025
replace GB15_outcomeW5 = 1 if districtW5 == 11026
replace GB15_outcomeW5 = 1 if districtW5 == 11027
replace GB15_outcomeW5 = 2 if districtW5 == 11028
replace GB15_outcomeW5 = 4 if districtW5 == 20058
replace GB15_outcomeW5 = 2 if districtW5 == 11029
replace GB15_outcomeW5 = 2 if districtW5 == 11030
replace GB15_outcomeW5 = 1 if districtW5 == 11031
replace GB15_outcomeW5 = 4 if districtW5 == 20059
replace GB15_outcomeW5 = 2 if districtW5 == 11032
replace GB15_outcomeW5 = 2 if districtW5 == 11033
replace GB15_outcomeW5 = 2 if districtW5 == 11036
replace GB15_outcomeW5 = 3 if districtW5 == 11037
replace GB15_outcomeW5 = 1 if districtW5 == 11038
replace GB15_outcomeW5 = 1 if districtW5 == 11034
replace GB15_outcomeW5 = -9999 if districtW5 == 40018
replace GB15_outcomeW5 = 1 if districtW5 == 11035
replace GB15_outcomeW5 = 2 if districtW5 == 11039
replace GB15_outcomeW5 = 1 if districtW5 == 11040
replace GB15_outcomeW5 = 1 if districtW5 == 11041
replace GB15_outcomeW5 = 1 if districtW5 == 11042
replace GB15_outcomeW5 = 2 if districtW5 == 11043
replace GB15_outcomeW5 = 2 if districtW5 == 11044
replace GB15_outcomeW5 = 1 if districtW5 == 11045
replace GB15_outcomeW5 = 1 if districtW5 == 11046
replace GB15_outcomeW5 = 1 if districtW5 == 11047
replace GB15_outcomeW5 = 1 if districtW5 == 11048
replace GB15_outcomeW5 = 2 if districtW5 == 11049
replace GB15_outcomeW5 = 2 if districtW5 == 11050
replace GB15_outcomeW5 = 2 if districtW5 == 11051
replace GB15_outcomeW5 = 1 if districtW5 == 11052
replace GB15_outcomeW5 = 2 if districtW5 == 11053
replace GB15_outcomeW5 = 2 if districtW5 == 11054
replace GB15_outcomeW5 = 1 if districtW5 == 11055
replace GB15_outcomeW5 = 2 if districtW5 == 30044
replace GB15_outcomeW5 = 1 if districtW5 == 11056
replace GB15_outcomeW5 = 1 if districtW5 == 11057
replace GB15_outcomeW5 = 1 if districtW5 == 11058
replace GB15_outcomeW5 = 2 if districtW5 == 11059
replace GB15_outcomeW5 = 1 if districtW5 == 11060
replace GB15_outcomeW5 = 2 if districtW5 == 30041
replace GB15_outcomeW5 = 2 if districtW5 == 11061
replace GB15_outcomeW5 = 1 if districtW5 == 11062


****************************************************
** DISTRICT-LEVEL OUTCOMES: 2017 GENERAL ELECTION **
****************************************************

* Note: 1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = SNP, 5 = Plaid Cymru, 6 = UKIP, 7 = Green Party, 8 = BNP, 9 = other party (including independents), 11 = Change UK – The Independent Group, 12 = Brexit Party, -9999 = Northern Ireland party

gen GB17_outcomeW11 = .

replace GB17_outcomeW11 = 2 if districtW11 == 30049
replace GB17_outcomeW11 = 1 if districtW11 == 30058
replace GB17_outcomeW11 = 4 if districtW11 == 20001
replace GB17_outcomeW11 = 1 if districtW11 == 20002
replace GB17_outcomeW11 = 4 if districtW11 == 20003
replace GB17_outcomeW11 = 1 if districtW11 == 10530
replace GB17_outcomeW11 = 1 if districtW11 == 10531
replace GB17_outcomeW11 = 1 if districtW11 == 10532
replace GB17_outcomeW11 = 2 if districtW11 == 30043
replace GB17_outcomeW11 = 1 if districtW11 == 10533
replace GB17_outcomeW11 = 1 if districtW11 == 20004
replace GB17_outcomeW11 = 5 if districtW11 == 30057
replace GB17_outcomeW11 = 4 if districtW11 == 20005
replace GB17_outcomeW11 = 1 if districtW11 == 10534
replace GB17_outcomeW11 = 2 if districtW11 == 10535
replace GB17_outcomeW11 = 1 if districtW11 == 10536
replace GB17_outcomeW11 = 2 if districtW11 == 10537
replace GB17_outcomeW11 = 1 if districtW11 == 10538
replace GB17_outcomeW11 = 1 if districtW11 == 20006
replace GB17_outcomeW11 = 1 if districtW11 == 10539
replace GB17_outcomeW11 = 1 if districtW11 == 20007
replace GB17_outcomeW11 = 2 if districtW11 == 10540
replace GB17_outcomeW11 = 2 if districtW11 == 10541
replace GB17_outcomeW11 = 2 if districtW11 == 10542
replace GB17_outcomeW11 = 2 if districtW11 == 10543
replace GB17_outcomeW11 = 1 if districtW11 == 10544
replace GB17_outcomeW11 = 1 if districtW11 == 10545
replace GB17_outcomeW11 = 2 if districtW11 == 10546
replace GB17_outcomeW11 = 3 if districtW11 == 10547
replace GB17_outcomeW11 = 2 if districtW11 == 10548
replace GB17_outcomeW11 = 2 if districtW11 == 10549
replace GB17_outcomeW11 = 1 if districtW11 == 10550
replace GB17_outcomeW11 = 1 if districtW11 == 10551
replace GB17_outcomeW11 = 2 if districtW11 == 10552
replace GB17_outcomeW11 = -9999 if districtW11 == 40001
replace GB17_outcomeW11 = -9999 if districtW11 == 40002
replace GB17_outcomeW11 = -9999 if districtW11 == 40003
replace GB17_outcomeW11 = -9999 if districtW11 == 40004
replace GB17_outcomeW11 = 2 if districtW11 == 10553
replace GB17_outcomeW11 = 1 if districtW11 == 20008
replace GB17_outcomeW11 = 1 if districtW11 == 10554
replace GB17_outcomeW11 = 2 if districtW11 == 10555
replace GB17_outcomeW11 = 1 if districtW11 == 10556
replace GB17_outcomeW11 = 1 if districtW11 == 10557
replace GB17_outcomeW11 = 1 if districtW11 == 10558
replace GB17_outcomeW11 = 2 if districtW11 == 10559
replace GB17_outcomeW11 = 2 if districtW11 == 10560
replace GB17_outcomeW11 = 2 if districtW11 == 10561
replace GB17_outcomeW11 = 2 if districtW11 == 10562
replace GB17_outcomeW11 = 2 if districtW11 == 10563
replace GB17_outcomeW11 = 2 if districtW11 == 10564
replace GB17_outcomeW11 = 2 if districtW11 == 10565
replace GB17_outcomeW11 = 2 if districtW11 == 10566
replace GB17_outcomeW11 = 2 if districtW11 == 10567
replace GB17_outcomeW11 = 2 if districtW11 == 10568
replace GB17_outcomeW11 = 2 if districtW11 == 10569
replace GB17_outcomeW11 = 2 if districtW11 == 10570
replace GB17_outcomeW11 = 2 if districtW11 == 10571
replace GB17_outcomeW11 = 1 if districtW11 == 10572
replace GB17_outcomeW11 = 2 if districtW11 == 10573
replace GB17_outcomeW11 = 2 if districtW11 == 30072
replace GB17_outcomeW11 = 2 if districtW11 == 10574
replace GB17_outcomeW11 = 2 if districtW11 == 10575
replace GB17_outcomeW11 = 1 if districtW11 == 10576
replace GB17_outcomeW11 = 2 if districtW11 == 10577
replace GB17_outcomeW11 = 2 if districtW11 == 10578
replace GB17_outcomeW11 = 2 if districtW11 == 10579
replace GB17_outcomeW11 = 1 if districtW11 == 10580
replace GB17_outcomeW11 = 2 if districtW11 == 10581
replace GB17_outcomeW11 = 1 if districtW11 == 10582
replace GB17_outcomeW11 = 1 if districtW11 == 10583
replace GB17_outcomeW11 = 1 if districtW11 == 10584
replace GB17_outcomeW11 = 1 if districtW11 == 10585
replace GB17_outcomeW11 = 1 if districtW11 == 10586
replace GB17_outcomeW11 = 2 if districtW11 == 10587
replace GB17_outcomeW11 = 2 if districtW11 == 10588
replace GB17_outcomeW11 = 2 if districtW11 == 10589
replace GB17_outcomeW11 = 1 if districtW11 == 10590
replace GB17_outcomeW11 = 1 if districtW11 == 30068
replace GB17_outcomeW11 = 2 if districtW11 == 10591
replace GB17_outcomeW11 = 2 if districtW11 == 10593
replace GB17_outcomeW11 = 2 if districtW11 == 10592
replace GB17_outcomeW11 = 1 if districtW11 == 10594
replace GB17_outcomeW11 = 2 if districtW11 == 30073
replace GB17_outcomeW11 = 1 if districtW11 == 10595
replace GB17_outcomeW11 = 1 if districtW11 == 10596
replace GB17_outcomeW11 = 2 if districtW11 == 10597
replace GB17_outcomeW11 = 7 if districtW11 == 10598
replace GB17_outcomeW11 = 2 if districtW11 == 10599
replace GB17_outcomeW11 = 2 if districtW11 == 10600
replace GB17_outcomeW11 = 2 if districtW11 == 10601
replace GB17_outcomeW11 = 2 if districtW11 == 10602
replace GB17_outcomeW11 = 1 if districtW11 == 10603
replace GB17_outcomeW11 = 1 if districtW11 == 10604
replace GB17_outcomeW11 = 1 if districtW11 == 10605
replace GB17_outcomeW11 = 1 if districtW11 == 10606
replace GB17_outcomeW11 = 1 if districtW11 == 10607
replace GB17_outcomeW11 = 1 if districtW11 == 10608
replace GB17_outcomeW11 = 2 if districtW11 == 10609
replace GB17_outcomeW11 = 1 if districtW11 == 10610
replace GB17_outcomeW11 = 2 if districtW11 == 10611
replace GB17_outcomeW11 = 2 if districtW11 == 10612
replace GB17_outcomeW11 = 1 if districtW11 == 10613
replace GB17_outcomeW11 = 2 if districtW11 == 30076
replace GB17_outcomeW11 = 3 if districtW11 == 20009
replace GB17_outcomeW11 = 1 if districtW11 == 10614
replace GB17_outcomeW11 = 2 if districtW11 == 10615
replace GB17_outcomeW11 = 1 if districtW11 == 10616
replace GB17_outcomeW11 = 2 if districtW11 == 10617
replace GB17_outcomeW11 = 1 if districtW11 == 10618
replace GB17_outcomeW11 = 2 if districtW11 == 10619
replace GB17_outcomeW11 = 2 if districtW11 == 30050
replace GB17_outcomeW11 = 2 if districtW11 == 30051
replace GB17_outcomeW11 = 2 if districtW11 == 30080
replace GB17_outcomeW11 = 2 if districtW11 == 30079
replace GB17_outcomeW11 = 1 if districtW11 == 10620
replace GB17_outcomeW11 = 5 if districtW11 == 30067
replace GB17_outcomeW11 = 1 if districtW11 == 30066
replace GB17_outcomeW11 = 3 if districtW11 == 10621
replace GB17_outcomeW11 = 1 if districtW11 == 10622
replace GB17_outcomeW11 = 4 if districtW11 == 20010
replace GB17_outcomeW11 = 1 if districtW11 == 10623
replace GB17_outcomeW11 = 1 if districtW11 == 10624
replace GB17_outcomeW11 = 5 if districtW11 == 30064
replace GB17_outcomeW11 = 1 if districtW11 == 10625
replace GB17_outcomeW11 = 1 if districtW11 == 10626
replace GB17_outcomeW11 = 1 if districtW11 == 10627
replace GB17_outcomeW11 = 1 if districtW11 == 10628
replace GB17_outcomeW11 = 1 if districtW11 == 10629
replace GB17_outcomeW11 = 1 if districtW11 == 10630
replace GB17_outcomeW11 = 1 if districtW11 == 10631
replace GB17_outcomeW11 = 2 if districtW11 == 10632
replace GB17_outcomeW11 = 1 if districtW11 == 10633
replace GB17_outcomeW11 = 1 if districtW11 == 10634
replace GB17_outcomeW11 = 1 if districtW11 == 10635
replace GB17_outcomeW11 = 1 if districtW11 == 10636
replace GB17_outcomeW11 = 2 if districtW11 == 10637
replace GB17_outcomeW11 = 1 if districtW11 == 10638
replace GB17_outcomeW11 = 1 if districtW11 == 10639
replace GB17_outcomeW11 = 2 if districtW11 == 10640
replace GB17_outcomeW11 = 2 if districtW11 == 10641
replace GB17_outcomeW11 = 1 if districtW11 == 10642
replace GB17_outcomeW11 = 1 if districtW11 == 10643
replace GB17_outcomeW11 = 2 if districtW11 == 30062
replace GB17_outcomeW11 = 1 if districtW11 == 30059
replace GB17_outcomeW11 = 2 if districtW11 == 20011
replace GB17_outcomeW11 = 1 if districtW11 == 10644
replace GB17_outcomeW11 = 2 if districtW11 == 10645
replace GB17_outcomeW11 = 1 if districtW11 == 10646
replace GB17_outcomeW11 = 1 if districtW11 == 10647
replace GB17_outcomeW11 = 1 if districtW11 == 10648
replace GB17_outcomeW11 = 2 if districtW11 == 10649
replace GB17_outcomeW11 = 2 if districtW11 == 10650
replace GB17_outcomeW11 = 2 if districtW11 == 10651
replace GB17_outcomeW11 = 1 if districtW11 == 10652
replace GB17_outcomeW11 = 2 if districtW11 == 10653
replace GB17_outcomeW11 = 2 if districtW11 == 10654
replace GB17_outcomeW11 = 2 if districtW11 == 10655
replace GB17_outcomeW11 = 1 if districtW11 == 10656
replace GB17_outcomeW11 = 4 if districtW11 == 20012
replace GB17_outcomeW11 = 2 if districtW11 == 30070
replace GB17_outcomeW11 = 2 if districtW11 == 10657
replace GB17_outcomeW11 = 2 if districtW11 == 10658
replace GB17_outcomeW11 = 1 if districtW11 == 10659
replace GB17_outcomeW11 = 1 if districtW11 == 10660
replace GB17_outcomeW11 = 2 if districtW11 == 30042
replace GB17_outcomeW11 = 2 if districtW11 == 10661
replace GB17_outcomeW11 = 2 if districtW11 == 10662
replace GB17_outcomeW11 = 1 if districtW11 == 10664
replace GB17_outcomeW11 = 2 if districtW11 == 10663
replace GB17_outcomeW11 = 1 if districtW11 == 10665
replace GB17_outcomeW11 = 2 if districtW11 == 10666
replace GB17_outcomeW11 = 2 if districtW11 == 10668
replace GB17_outcomeW11 = 2 if districtW11 == 10669
replace GB17_outcomeW11 = 2 if districtW11 == 10667
replace GB17_outcomeW11 = 1 if districtW11 == 10670
replace GB17_outcomeW11 = 2 if districtW11 == 10671
replace GB17_outcomeW11 = 1 if districtW11 == 10672
replace GB17_outcomeW11 = 2 if districtW11 == 10673
replace GB17_outcomeW11 = 1 if districtW11 == 20013
replace GB17_outcomeW11 = 1 if districtW11 == 20014
replace GB17_outcomeW11 = 4 if districtW11 == 20015
replace GB17_outcomeW11 = 4 if districtW11 == 20016
replace GB17_outcomeW11 = 4 if districtW11 == 20017
replace GB17_outcomeW11 = 5 if districtW11 == 30061
replace GB17_outcomeW11 = 2 if districtW11 == 10674
replace GB17_outcomeW11 = 2 if districtW11 == 10675
replace GB17_outcomeW11 = 2 if districtW11 == 10676
replace GB17_outcomeW11 = 2 if districtW11 == 10677
replace GB17_outcomeW11 = -9999 if districtW11 == 40005
replace GB17_outcomeW11 = 3 if districtW11 == 10684
replace GB17_outcomeW11 = 1 if districtW11 == 10678
replace GB17_outcomeW11 = 3 if districtW11 == 20018
replace GB17_outcomeW11 = 2 if districtW11 == 10679
replace GB17_outcomeW11 = 1 if districtW11 == 10680
replace GB17_outcomeW11 = 4 if districtW11 == 20019
replace GB17_outcomeW11 = 1 if districtW11 == 10685
replace GB17_outcomeW11 = -9999 if districtW11 == 40006
replace GB17_outcomeW11 = 2 if districtW11 == 20020
replace GB17_outcomeW11 = 1 if districtW11 == 20021
replace GB17_outcomeW11 = 1 if districtW11 == 10681
replace GB17_outcomeW11 = 1 if districtW11 == 10682
replace GB17_outcomeW11 = 1 if districtW11 == 10683
replace GB17_outcomeW11 = 1 if districtW11 == 10686
replace GB17_outcomeW11 = 4 if districtW11 == 20022
replace GB17_outcomeW11 = 4 if districtW11 == 20023
replace GB17_outcomeW11 = 2 if districtW11 == 20024
replace GB17_outcomeW11 = 4 if districtW11 == 20025
replace GB17_outcomeW11 = 3 if districtW11 == 20026
replace GB17_outcomeW11 = 2 if districtW11 == 10687
replace GB17_outcomeW11 = 2 if districtW11 == 10688
replace GB17_outcomeW11 = 1 if districtW11 == 10689
replace GB17_outcomeW11 = 2 if districtW11 == 10690
replace GB17_outcomeW11 = 2 if districtW11 == 10691
replace GB17_outcomeW11 = 2 if districtW11 == 10692
replace GB17_outcomeW11 = 1 if districtW11 == 10693
replace GB17_outcomeW11 = 1 if districtW11 == 10694
replace GB17_outcomeW11 = 1 if districtW11 == 10695
replace GB17_outcomeW11 = 2 if districtW11 == 10696
replace GB17_outcomeW11 = 1 if districtW11 == 10697
replace GB17_outcomeW11 = 2 if districtW11 == 10698
replace GB17_outcomeW11 = 4 if districtW11 == 20028
replace GB17_outcomeW11 = 1 if districtW11 == 10699
replace GB17_outcomeW11 = 1 if districtW11 == 10700
replace GB17_outcomeW11 = 2 if districtW11 == 10701
replace GB17_outcomeW11 = -9999 if districtW11 == 40007
replace GB17_outcomeW11 = 1 if districtW11 == 10702
replace GB17_outcomeW11 = 1 if districtW11 == 10703
replace GB17_outcomeW11 = 1 if districtW11 == 10704
replace GB17_outcomeW11 = 1 if districtW11 == 10705
replace GB17_outcomeW11 = -9999 if districtW11 == 40008
replace GB17_outcomeW11 = 1 if districtW11 == 10706
replace GB17_outcomeW11 = 1 if districtW11 == 10707
replace GB17_outcomeW11 = 2 if districtW11 == 10708
replace GB17_outcomeW11 = 2 if districtW11 == 10709
replace GB17_outcomeW11 = 2 if districtW11 == 10710
replace GB17_outcomeW11 = 1 if districtW11 == 10711
replace GB17_outcomeW11 = 4 if districtW11 == 20029
replace GB17_outcomeW11 = 4 if districtW11 == 20030
replace GB17_outcomeW11 = 4 if districtW11 == 20031
replace GB17_outcomeW11 = 2 if districtW11 == 20032
replace GB17_outcomeW11 = 4 if districtW11 == 20033
replace GB17_outcomeW11 = 4 if districtW11 == 20034
replace GB17_outcomeW11 = 4 if districtW11 == 20035
replace GB17_outcomeW11 = 4 if districtW11 == 20036
replace GB17_outcomeW11 = 1 if districtW11 == 10712
replace GB17_outcomeW11 = 1 if districtW11 == 20037
replace GB17_outcomeW11 = 1 if districtW11 == 10713
replace GB17_outcomeW11 = 2 if districtW11 == 30046
replace GB17_outcomeW11 = 1 if districtW11 == 10714
replace GB17_outcomeW11 = 1 if districtW11 == 10715
replace GB17_outcomeW11 = 2 if districtW11 == 10716
replace GB17_outcomeW11 = 1 if districtW11 == 10717
replace GB17_outcomeW11 = 2 if districtW11 == 10718
replace GB17_outcomeW11 = 1 if districtW11 == 10719
replace GB17_outcomeW11 = 2 if districtW11 == 10720
replace GB17_outcomeW11 = 2 if districtW11 == 10721
replace GB17_outcomeW11 = 1 if districtW11 == 10722
replace GB17_outcomeW11 = 2 if districtW11 == 10723
replace GB17_outcomeW11 = 1 if districtW11 == 10724
replace GB17_outcomeW11 = 2 if districtW11 == 10725
replace GB17_outcomeW11 = 2 if districtW11 == 10726
replace GB17_outcomeW11 = 2 if districtW11 == 10727
replace GB17_outcomeW11 = 1 if districtW11 == 10728
replace GB17_outcomeW11 = 1 if districtW11 == 10729
replace GB17_outcomeW11 = 1 if districtW11 == 10730
replace GB17_outcomeW11 = 1 if districtW11 == 10731
replace GB17_outcomeW11 = 2 if districtW11 == 10732
replace GB17_outcomeW11 = 2 if districtW11 == 10733
replace GB17_outcomeW11 = 1 if districtW11 == 10734
replace GB17_outcomeW11 = 1 if districtW11 == 10735
replace GB17_outcomeW11 = 1 if districtW11 == 10736
replace GB17_outcomeW11 = 2 if districtW11 == 10737
replace GB17_outcomeW11 = 1 if districtW11 == 10738
replace GB17_outcomeW11 = 1 if districtW11 == 10739
replace GB17_outcomeW11 = 2 if districtW11 == 10740
replace GB17_outcomeW11 = 1 if districtW11 == 10741
replace GB17_outcomeW11 = 1 if districtW11 == 10742
replace GB17_outcomeW11 = 1 if districtW11 == 10743
replace GB17_outcomeW11 = 1 if districtW11 == 10744
replace GB17_outcomeW11 = 1 if districtW11 == 10745
replace GB17_outcomeW11 = 1 if districtW11 == 10746
replace GB17_outcomeW11 = 2 if districtW11 == 10747
replace GB17_outcomeW11 = 2 if districtW11 == 10748
replace GB17_outcomeW11 = 1 if districtW11 == 10749
replace GB17_outcomeW11 = 2 if districtW11 == 10750
replace GB17_outcomeW11 = 1 if districtW11 == 10751
replace GB17_outcomeW11 = 2 if districtW11 == 10752
replace GB17_outcomeW11 = 1 if districtW11 == 10753
replace GB17_outcomeW11 = 2 if districtW11 == 10754
replace GB17_outcomeW11 = 2 if districtW11 == 10755
replace GB17_outcomeW11 = 2 if districtW11 == 10756
replace GB17_outcomeW11 = 1 if districtW11 == 10757
replace GB17_outcomeW11 = 2 if districtW11 == 10758
replace GB17_outcomeW11 = 2 if districtW11 == 10759
replace GB17_outcomeW11 = 2 if districtW11 == 10760
replace GB17_outcomeW11 = 4 if districtW11 == 20038
replace GB17_outcomeW11 = 4 if districtW11 == 20039
replace GB17_outcomeW11 = 2 if districtW11 == 10761
replace GB17_outcomeW11 = 1 if districtW11 == 10762
replace GB17_outcomeW11 = 2 if districtW11 == 10763
replace GB17_outcomeW11 = 2 if districtW11 == 10764
replace GB17_outcomeW11 = 2 if districtW11 == 30077
replace GB17_outcomeW11 = 2 if districtW11 == 10765
replace GB17_outcomeW11 = 2 if districtW11 == 10766
replace GB17_outcomeW11 = 1 if districtW11 == 10767
replace GB17_outcomeW11 = 2 if districtW11 == 10768
replace GB17_outcomeW11 = 1 if districtW11 == 10769
replace GB17_outcomeW11 = 4 if districtW11 == 20040
replace GB17_outcomeW11 = 3 if districtW11 == 10770
replace GB17_outcomeW11 = 2 if districtW11 == 10771
replace GB17_outcomeW11 = 2 if districtW11 == 10772
replace GB17_outcomeW11 = 2 if districtW11 == 10773
replace GB17_outcomeW11 = 1 if districtW11 == 10774
replace GB17_outcomeW11 = 2 if districtW11 == 20041
replace GB17_outcomeW11 = 2 if districtW11 == 10775
replace GB17_outcomeW11 = -9999 if districtW11 == 40009
replace GB17_outcomeW11 = 4 if districtW11 == 20042
replace GB17_outcomeW11 = 2 if districtW11 == 10776
replace GB17_outcomeW11 = 2 if districtW11 == 10777
replace GB17_outcomeW11 = 2 if districtW11 == 10778
replace GB17_outcomeW11 = 2 if districtW11 == 10779
replace GB17_outcomeW11 = 2 if districtW11 == 10780
replace GB17_outcomeW11 = 2 if districtW11 == 10781
replace GB17_outcomeW11 = 2 if districtW11 == 10782
replace GB17_outcomeW11 = 2 if districtW11 == 10783
replace GB17_outcomeW11 = 2 if districtW11 == 10784
replace GB17_outcomeW11 = 2 if districtW11 == 10785
replace GB17_outcomeW11 = 1 if districtW11 == 10786
replace GB17_outcomeW11 = 2 if districtW11 == 10789
replace GB17_outcomeW11 = 2 if districtW11 == 10787
replace GB17_outcomeW11 = 2 if districtW11 == 10788
replace GB17_outcomeW11 = 2 if districtW11 == 10790
replace GB17_outcomeW11 = 1 if districtW11 == 10791
replace GB17_outcomeW11 = 2 if districtW11 == 10792
replace GB17_outcomeW11 = 4 if districtW11 == 20043
replace GB17_outcomeW11 = 2 if districtW11 == 10793
replace GB17_outcomeW11 = 2 if districtW11 == 10794
replace GB17_outcomeW11 = 2 if districtW11 == 10795
replace GB17_outcomeW11 = 2 if districtW11 == 10796
replace GB17_outcomeW11 = 4 if districtW11 == 20044
replace GB17_outcomeW11 = 2 if districtW11 == 30045
replace GB17_outcomeW11 = 1 if districtW11 == 10797
replace GB17_outcomeW11 = 1 if districtW11 == 10798
replace GB17_outcomeW11 = 1 if districtW11 == 10799
replace GB17_outcomeW11 = 2 if districtW11 == 10800
replace GB17_outcomeW11 = 2 if districtW11 == 10801
replace GB17_outcomeW11 = 1 if districtW11 == 10802
replace GB17_outcomeW11 = 1 if districtW11 == 10803
replace GB17_outcomeW11 = 1 if districtW11 == 10804
replace GB17_outcomeW11 = 2 if districtW11 == 10805
replace GB17_outcomeW11 = 1 if districtW11 == 10806
replace GB17_outcomeW11 = 2 if districtW11 == 10807
replace GB17_outcomeW11 = 2 if districtW11 == 10808
replace GB17_outcomeW11 = 2 if districtW11 == 10809
replace GB17_outcomeW11 = 1 if districtW11 == 10810
replace GB17_outcomeW11 = 1 if districtW11 == 10811
replace GB17_outcomeW11 = 1 if districtW11 == 10812
replace GB17_outcomeW11 = 2 if districtW11 == 30071
replace GB17_outcomeW11 = 1 if districtW11 == 10813
replace GB17_outcomeW11 = 1 if districtW11 == 10814
replace GB17_outcomeW11 = 2 if districtW11 == 10819
replace GB17_outcomeW11 = 1 if districtW11 == 10820
replace GB17_outcomeW11 = 1 if districtW11 == 10815
replace GB17_outcomeW11 = 2 if districtW11 == 20045
replace GB17_outcomeW11 = 1 if districtW11 == 10816
replace GB17_outcomeW11 = 1 if districtW11 == 10817
replace GB17_outcomeW11 = -9999 if districtW11 == 40010
replace GB17_outcomeW11 = 1 if districtW11 == 10818
replace GB17_outcomeW11 = 1 if districtW11 == 10821
replace GB17_outcomeW11 = 1 if districtW11 == 10822
replace GB17_outcomeW11 = 2 if districtW11 == 10823
replace GB17_outcomeW11 = 1 if districtW11 == 10824
replace GB17_outcomeW11 = 1 if districtW11 == 30054
replace GB17_outcomeW11 = 1 if districtW11 == 30063
replace GB17_outcomeW11 = 1 if districtW11 == 20046
replace GB17_outcomeW11 = 1 if districtW11 == 10825
replace GB17_outcomeW11 = 1 if districtW11 == 10826
replace GB17_outcomeW11 = 4 if districtW11 == 20047
replace GB17_outcomeW11 = 4 if districtW11 == 20027
replace GB17_outcomeW11 = 2 if districtW11 == 30069
replace GB17_outcomeW11 = 1 if districtW11 == 10829
replace GB17_outcomeW11 = 1 if districtW11 == 10830
replace GB17_outcomeW11 = 2 if districtW11 == 10834
replace GB17_outcomeW11 = 2 if districtW11 == 10831
replace GB17_outcomeW11 = 2 if districtW11 == 10832
replace GB17_outcomeW11 = 2 if districtW11 == 10833
replace GB17_outcomeW11 = 1 if districtW11 == 10827
replace GB17_outcomeW11 = 1 if districtW11 == 10828
replace GB17_outcomeW11 = 2 if districtW11 == 30055
replace GB17_outcomeW11 = 2 if districtW11 == 30056
replace GB17_outcomeW11 = -9999 if districtW11 == 40011
replace GB17_outcomeW11 = 1 if districtW11 == 10835
replace GB17_outcomeW11 = 2 if districtW11 == 10836
replace GB17_outcomeW11 = 1 if districtW11 == 10861
replace GB17_outcomeW11 = 1 if districtW11 == 10862
replace GB17_outcomeW11 = -9999 if districtW11 == 40012
replace GB17_outcomeW11 = 4 if districtW11 == 20048
replace GB17_outcomeW11 = 1 if districtW11 == 10837
replace GB17_outcomeW11 = 1 if districtW11 == 10838
replace GB17_outcomeW11 = 1 if districtW11 == 10839
replace GB17_outcomeW11 = -9999 if districtW11 == 40013
replace GB17_outcomeW11 = 2 if districtW11 == 10840
replace GB17_outcomeW11 = 1 if districtW11 == 10841
replace GB17_outcomeW11 = 1 if districtW11 == 10842
replace GB17_outcomeW11 = 1 if districtW11 == 10843
replace GB17_outcomeW11 = 4 if districtW11 == 20049
replace GB17_outcomeW11 = 1 if districtW11 == 10844
replace GB17_outcomeW11 = 1 if districtW11 == 10845
replace GB17_outcomeW11 = 1 if districtW11 == 10846
replace GB17_outcomeW11 = 1 if districtW11 == 10847
replace GB17_outcomeW11 = 3 if districtW11 == 10848
replace GB17_outcomeW11 = 1 if districtW11 == 10849
replace GB17_outcomeW11 = 1 if districtW11 == 10850
replace GB17_outcomeW11 = 1 if districtW11 == 10851
replace GB17_outcomeW11 = 1 if districtW11 == 10852
replace GB17_outcomeW11 = 2 if districtW11 == 10853
replace GB17_outcomeW11 = 1 if districtW11 == 10854
replace GB17_outcomeW11 = 1 if districtW11 == 10855
replace GB17_outcomeW11 = 2 if districtW11 == 10856
replace GB17_outcomeW11 = 1 if districtW11 == 10857
replace GB17_outcomeW11 = 1 if districtW11 == 10858
replace GB17_outcomeW11 = 1 if districtW11 == 10859
replace GB17_outcomeW11 = 1 if districtW11 == 10860
replace GB17_outcomeW11 = 1 if districtW11 == 10863
replace GB17_outcomeW11 = 2 if districtW11 == 10864
replace GB17_outcomeW11 = 2 if districtW11 == 10865
replace GB17_outcomeW11 = 2 if districtW11 == 10866
replace GB17_outcomeW11 = 2 if districtW11 == 10867
replace GB17_outcomeW11 = 1 if districtW11 == 10868
replace GB17_outcomeW11 = 1 if districtW11 == 20050
replace GB17_outcomeW11 = 2 if districtW11 == 30074
replace GB17_outcomeW11 = 1 if districtW11 == 10869
replace GB17_outcomeW11 = 2 if districtW11 == 10870
replace GB17_outcomeW11 = 2 if districtW11 == 10871
replace GB17_outcomeW11 = 3 if districtW11 == 20051
replace GB17_outcomeW11 = 1 if districtW11 == 10872
replace GB17_outcomeW11 = 2 if districtW11 == 10873
replace GB17_outcomeW11 = 3 if districtW11 == 10874
replace GB17_outcomeW11 = 4 if districtW11 == 20052
replace GB17_outcomeW11 = 4 if districtW11 == 20053
replace GB17_outcomeW11 = 1 if districtW11 == 10875
replace GB17_outcomeW11 = 2 if districtW11 == 10876
replace GB17_outcomeW11 = 1 if districtW11 == 10877
replace GB17_outcomeW11 = 4 if districtW11 == 20054
replace GB17_outcomeW11 = 2 if districtW11 == 10878
replace GB17_outcomeW11 = 1 if districtW11 == 10879
replace GB17_outcomeW11 = 2 if districtW11 == 10880
replace GB17_outcomeW11 = 2 if districtW11 == 30075
replace GB17_outcomeW11 = 1 if districtW11 == 10881
replace GB17_outcomeW11 = 2 if districtW11 == 10882
replace GB17_outcomeW11 = 1 if districtW11 == 10883
replace GB17_outcomeW11 = 2 if districtW11 == 10884
replace GB17_outcomeW11 = 1 if districtW11 == 30065
replace GB17_outcomeW11 = 2 if districtW11 == 10885
replace GB17_outcomeW11 = 1 if districtW11 == 10886
replace GB17_outcomeW11 = 1 if districtW11 == 10887
replace GB17_outcomeW11 = 1 if districtW11 == 10888
replace GB17_outcomeW11 = 2 if districtW11 == 10889
replace GB17_outcomeW11 = 1 if districtW11 == 10890
replace GB17_outcomeW11 = 2 if districtW11 == 10891
replace GB17_outcomeW11 = 1 if districtW11 == 10892
replace GB17_outcomeW11 = 1 if districtW11 == 10893
replace GB17_outcomeW11 = 2 if districtW11 == 30052
replace GB17_outcomeW11 = 1 if districtW11 == 10894
replace GB17_outcomeW11 = 1 if districtW11 == 10896
replace GB17_outcomeW11 = 1 if districtW11 == 10895
replace GB17_outcomeW11 = 2 if districtW11 == 10897
replace GB17_outcomeW11 = 1 if districtW11 == 10898
replace GB17_outcomeW11 = 1 if districtW11 == 10899
replace GB17_outcomeW11 = 1 if districtW11 == 10900
replace GB17_outcomeW11 = 1 if districtW11 == 10901
replace GB17_outcomeW11 = 1 if districtW11 == 10902
replace GB17_outcomeW11 = 4 if districtW11 == 20055
replace GB17_outcomeW11 = 2 if districtW11 == 10904
replace GB17_outcomeW11 = 2 if districtW11 == 10903
replace GB17_outcomeW11 = 1 if districtW11 == 10905
replace GB17_outcomeW11 = 1 if districtW11 == 10906
replace GB17_outcomeW11 = 1 if districtW11 == 10907
replace GB17_outcomeW11 = 1 if districtW11 == 10908
replace GB17_outcomeW11 = 2 if districtW11 == 20056
replace GB17_outcomeW11 = 1 if districtW11 == 10909
replace GB17_outcomeW11 = 1 if districtW11 == 10910
replace GB17_outcomeW11 = 2 if districtW11 == 10911
replace GB17_outcomeW11 = 1 if districtW11 == 10912
replace GB17_outcomeW11 = 1 if districtW11 == 10913
replace GB17_outcomeW11 = 2 if districtW11 == 10914
replace GB17_outcomeW11 = 2 if districtW11 == 10915
replace GB17_outcomeW11 = 2 if districtW11 == 10916
replace GB17_outcomeW11 = 1 if districtW11 == 10917
replace GB17_outcomeW11 = 1 if districtW11 == 10918
replace GB17_outcomeW11 = 2 if districtW11 == 10921
replace GB17_outcomeW11 = 2 if districtW11 == 10919
replace GB17_outcomeW11 = 2 if districtW11 == 10922
replace GB17_outcomeW11 = 2 if districtW11 == 10923
replace GB17_outcomeW11 = 2 if districtW11 == 10920
replace GB17_outcomeW11 = 1 if districtW11 == 10924
replace GB17_outcomeW11 = 1 if districtW11 == 10925
replace GB17_outcomeW11 = 1 if districtW11 == 10926
replace GB17_outcomeW11 = 1 if districtW11 == 10927
replace GB17_outcomeW11 = 1 if districtW11 == 10928
replace GB17_outcomeW11 = 1 if districtW11 == 10929
replace GB17_outcomeW11 = 2 if districtW11 == 10930
replace GB17_outcomeW11 = 1 if districtW11 == 10931
replace GB17_outcomeW11 = 1 if districtW11 == 10932
replace GB17_outcomeW11 = 1 if districtW11 == 10955
replace GB17_outcomeW11 = 2 if districtW11 == 10956
replace GB17_outcomeW11 = -9999 if districtW11 == 40014
replace GB17_outcomeW11 = 1 if districtW11 == 10933
replace GB17_outcomeW11 = 1 if districtW11 == 10934
replace GB17_outcomeW11 = 1 if districtW11 == 10935
replace GB17_outcomeW11 = 1 if districtW11 == 10936
replace GB17_outcomeW11 = -9999 if districtW11 == 40015
replace GB17_outcomeW11 = 1 if districtW11 == 10937
replace GB17_outcomeW11 = 1 if districtW11 == 10938
replace GB17_outcomeW11 = 1 if districtW11 == 10957
replace GB17_outcomeW11 = 1 if districtW11 == 10939
replace GB17_outcomeW11 = 1 if districtW11 == 10940
replace GB17_outcomeW11 = 1 if districtW11 == 10941
replace GB17_outcomeW11 = 1 if districtW11 == 10942
replace GB17_outcomeW11 = 1 if districtW11 == 10958
replace GB17_outcomeW11 = 1 if districtW11 == 10943
replace GB17_outcomeW11 = 2 if districtW11 == 10944
replace GB17_outcomeW11 = 1 if districtW11 == 10945
replace GB17_outcomeW11 = 1 if districtW11 == 10946
replace GB17_outcomeW11 = 1 if districtW11 == 10947
replace GB17_outcomeW11 = 1 if districtW11 == 10948
replace GB17_outcomeW11 = 1 if districtW11 == 10949
replace GB17_outcomeW11 = 1 if districtW11 == 10950
replace GB17_outcomeW11 = 1 if districtW11 == 10951
replace GB17_outcomeW11 = 1 if districtW11 == 10952
replace GB17_outcomeW11 = 1 if districtW11 == 10953
replace GB17_outcomeW11 = 1 if districtW11 == 10954
replace GB17_outcomeW11 = 1 if districtW11 == 10959
replace GB17_outcomeW11 = 1 if districtW11 == 10965
replace GB17_outcomeW11 = 1 if districtW11 == 10966
replace GB17_outcomeW11 = 1 if districtW11 == 10960
replace GB17_outcomeW11 = 2 if districtW11 == 10967
replace GB17_outcomeW11 = 1 if districtW11 == 10961
replace GB17_outcomeW11 = 1 if districtW11 == 10968
replace GB17_outcomeW11 = 2 if districtW11 == 10962
replace GB17_outcomeW11 = 2 if districtW11 == 10963
replace GB17_outcomeW11 = 1 if districtW11 == 20057
replace GB17_outcomeW11 = 1 if districtW11 == 10964
replace GB17_outcomeW11 = 2 if districtW11 == 10969
replace GB17_outcomeW11 = 2 if districtW11 == 10970
replace GB17_outcomeW11 = 2 if districtW11 == 10971
replace GB17_outcomeW11 = 2 if districtW11 == 10972
replace GB17_outcomeW11 = 2 if districtW11 == 10973
replace GB17_outcomeW11 = 1 if districtW11 == 10974
replace GB17_outcomeW11 = 1 if districtW11 == 10975
replace GB17_outcomeW11 = 1 if districtW11 == 10976
replace GB17_outcomeW11 = -9999 if districtW11 == 40016
replace GB17_outcomeW11 = 1 if districtW11 == 10977
replace GB17_outcomeW11 = 2 if districtW11 == 10978
replace GB17_outcomeW11 = 2 if districtW11 == 10979
replace GB17_outcomeW11 = 2 if districtW11 == 10980
replace GB17_outcomeW11 = 1 if districtW11 == 10981
replace GB17_outcomeW11 = 2 if districtW11 == 10982
replace GB17_outcomeW11 = 1 if districtW11 == 10983
replace GB17_outcomeW11 = 1 if districtW11 == 10984
replace GB17_outcomeW11 = 1 if districtW11 == 10985
replace GB17_outcomeW11 = 2 if districtW11 == 30048
replace GB17_outcomeW11 = 2 if districtW11 == 30047
replace GB17_outcomeW11 = 1 if districtW11 == 10986
replace GB17_outcomeW11 = 1 if districtW11 == 10987
replace GB17_outcomeW11 = 1 if districtW11 == 10988
replace GB17_outcomeW11 = 1 if districtW11 == 10989
replace GB17_outcomeW11 = 1 if districtW11 == 10990
replace GB17_outcomeW11 = 1 if districtW11 == 10991
replace GB17_outcomeW11 = 1 if districtW11 == 10992
replace GB17_outcomeW11 = 1 if districtW11 == 10993
replace GB17_outcomeW11 = 1 if districtW11 == 10994
replace GB17_outcomeW11 = 1 if districtW11 == 10995
replace GB17_outcomeW11 = 1 if districtW11 == 10996
replace GB17_outcomeW11 = 1 if districtW11 == 10997
replace GB17_outcomeW11 = 2 if districtW11 == 10998
replace GB17_outcomeW11 = 1 if districtW11 == 10999
replace GB17_outcomeW11 = 2 if districtW11 == 30053
replace GB17_outcomeW11 = 1 if districtW11 == 11000
replace GB17_outcomeW11 = 1 if districtW11 == 11001
replace GB17_outcomeW11 = 2 if districtW11 == 11002
replace GB17_outcomeW11 = 1 if districtW11 == 11003
replace GB17_outcomeW11 = 1 if districtW11 == 11004
replace GB17_outcomeW11 = 3 if districtW11 == 11005
replace GB17_outcomeW11 = 2 if districtW11 == 11006
replace GB17_outcomeW11 = -9999 if districtW11 == 40017
replace GB17_outcomeW11 = 1 if districtW11 == 11007
replace GB17_outcomeW11 = 2 if districtW11 == 30060
replace GB17_outcomeW11 = 1 if districtW11 == 30078
replace GB17_outcomeW11 = 2 if districtW11 == 11008
replace GB17_outcomeW11 = 2 if districtW11 == 11009
replace GB17_outcomeW11 = 2 if districtW11 == 11010
replace GB17_outcomeW11 = 1 if districtW11 == 11011
replace GB17_outcomeW11 = 2 if districtW11 == 11012
replace GB17_outcomeW11 = 2 if districtW11 == 11013
replace GB17_outcomeW11 = 2 if districtW11 == 11014
replace GB17_outcomeW11 = 1 if districtW11 == 11015
replace GB17_outcomeW11 = 2 if districtW11 == 11016
replace GB17_outcomeW11 = 2 if districtW11 == 11017
replace GB17_outcomeW11 = 2 if districtW11 == 11018
replace GB17_outcomeW11 = 2 if districtW11 == 11019
replace GB17_outcomeW11 = 2 if districtW11 == 11020
replace GB17_outcomeW11 = 1 if districtW11 == 11021
replace GB17_outcomeW11 = 1 if districtW11 == 11022
replace GB17_outcomeW11 = 1 if districtW11 == 11023
replace GB17_outcomeW11 = 2 if districtW11 == 11024
replace GB17_outcomeW11 = 1 if districtW11 == 11025
replace GB17_outcomeW11 = 1 if districtW11 == 11026
replace GB17_outcomeW11 = 1 if districtW11 == 11027
replace GB17_outcomeW11 = 2 if districtW11 == 11028
replace GB17_outcomeW11 = 1 if districtW11 == 20058
replace GB17_outcomeW11 = 2 if districtW11 == 11029
replace GB17_outcomeW11 = 2 if districtW11 == 11030
replace GB17_outcomeW11 = 1 if districtW11 == 11031
replace GB17_outcomeW11 = 4 if districtW11 == 20059
replace GB17_outcomeW11 = 2 if districtW11 == 11032
replace GB17_outcomeW11 = 2 if districtW11 == 11033
replace GB17_outcomeW11 = 2 if districtW11 == 11036
replace GB17_outcomeW11 = 3 if districtW11 == 11037
replace GB17_outcomeW11 = 1 if districtW11 == 11038
replace GB17_outcomeW11 = 1 if districtW11 == 11034
replace GB17_outcomeW11 = -9999 if districtW11 == 40018
replace GB17_outcomeW11 = 1 if districtW11 == 11035
replace GB17_outcomeW11 = 2 if districtW11 == 11039
replace GB17_outcomeW11 = 1 if districtW11 == 11040
replace GB17_outcomeW11 = 1 if districtW11 == 11041
replace GB17_outcomeW11 = 1 if districtW11 == 11042
replace GB17_outcomeW11 = 2 if districtW11 == 11043
replace GB17_outcomeW11 = 2 if districtW11 == 11044
replace GB17_outcomeW11 = 1 if districtW11 == 11045
replace GB17_outcomeW11 = 1 if districtW11 == 11046
replace GB17_outcomeW11 = 1 if districtW11 == 11047
replace GB17_outcomeW11 = 1 if districtW11 == 11048
replace GB17_outcomeW11 = 2 if districtW11 == 11049
replace GB17_outcomeW11 = 2 if districtW11 == 11050
replace GB17_outcomeW11 = 2 if districtW11 == 11051
replace GB17_outcomeW11 = 1 if districtW11 == 11052
replace GB17_outcomeW11 = 2 if districtW11 == 11053
replace GB17_outcomeW11 = 2 if districtW11 == 11054
replace GB17_outcomeW11 = 1 if districtW11 == 11055
replace GB17_outcomeW11 = 2 if districtW11 == 30044
replace GB17_outcomeW11 = 1 if districtW11 == 11056
replace GB17_outcomeW11 = 1 if districtW11 == 11057
replace GB17_outcomeW11 = 1 if districtW11 == 11058
replace GB17_outcomeW11 = 2 if districtW11 == 11059
replace GB17_outcomeW11 = 1 if districtW11 == 11060
replace GB17_outcomeW11 = 2 if districtW11 == 30041
replace GB17_outcomeW11 = 2 if districtW11 == 11061
replace GB17_outcomeW11 = 1 if districtW11 == 11062

gen GB17_outcomeW12 = .

replace GB17_outcomeW12 = 2 if districtW12 == 30049
replace GB17_outcomeW12 = 1 if districtW12 == 30058
replace GB17_outcomeW12 = 4 if districtW12 == 20001
replace GB17_outcomeW12 = 1 if districtW12 == 20002
replace GB17_outcomeW12 = 4 if districtW12 == 20003
replace GB17_outcomeW12 = 1 if districtW12 == 10530
replace GB17_outcomeW12 = 1 if districtW12 == 10531
replace GB17_outcomeW12 = 1 if districtW12 == 10532
replace GB17_outcomeW12 = 2 if districtW12 == 30043
replace GB17_outcomeW12 = 1 if districtW12 == 10533
replace GB17_outcomeW12 = 1 if districtW12 == 20004
replace GB17_outcomeW12 = 5 if districtW12 == 30057
replace GB17_outcomeW12 = 4 if districtW12 == 20005
replace GB17_outcomeW12 = 1 if districtW12 == 10534
replace GB17_outcomeW12 = 2 if districtW12 == 10535
replace GB17_outcomeW12 = 1 if districtW12 == 10536
replace GB17_outcomeW12 = 2 if districtW12 == 10537
replace GB17_outcomeW12 = 1 if districtW12 == 10538
replace GB17_outcomeW12 = 1 if districtW12 == 20006
replace GB17_outcomeW12 = 1 if districtW12 == 10539
replace GB17_outcomeW12 = 1 if districtW12 == 20007
replace GB17_outcomeW12 = 2 if districtW12 == 10540
replace GB17_outcomeW12 = 2 if districtW12 == 10541
replace GB17_outcomeW12 = 2 if districtW12 == 10542
replace GB17_outcomeW12 = 2 if districtW12 == 10543
replace GB17_outcomeW12 = 1 if districtW12 == 10544
replace GB17_outcomeW12 = 1 if districtW12 == 10545
replace GB17_outcomeW12 = 2 if districtW12 == 10546
replace GB17_outcomeW12 = 3 if districtW12 == 10547
replace GB17_outcomeW12 = 2 if districtW12 == 10548
replace GB17_outcomeW12 = 2 if districtW12 == 10549
replace GB17_outcomeW12 = 1 if districtW12 == 10550
replace GB17_outcomeW12 = 1 if districtW12 == 10551
replace GB17_outcomeW12 = 2 if districtW12 == 10552
replace GB17_outcomeW12 = -9999 if districtW12 == 40001
replace GB17_outcomeW12 = -9999 if districtW12 == 40002
replace GB17_outcomeW12 = -9999 if districtW12 == 40003
replace GB17_outcomeW12 = -9999 if districtW12 == 40004
replace GB17_outcomeW12 = 2 if districtW12 == 10553
replace GB17_outcomeW12 = 1 if districtW12 == 20008
replace GB17_outcomeW12 = 1 if districtW12 == 10554
replace GB17_outcomeW12 = 2 if districtW12 == 10555
replace GB17_outcomeW12 = 1 if districtW12 == 10556
replace GB17_outcomeW12 = 1 if districtW12 == 10557
replace GB17_outcomeW12 = 1 if districtW12 == 10558
replace GB17_outcomeW12 = 2 if districtW12 == 10559
replace GB17_outcomeW12 = 2 if districtW12 == 10560
replace GB17_outcomeW12 = 2 if districtW12 == 10561
replace GB17_outcomeW12 = 2 if districtW12 == 10562
replace GB17_outcomeW12 = 2 if districtW12 == 10563
replace GB17_outcomeW12 = 2 if districtW12 == 10564
replace GB17_outcomeW12 = 2 if districtW12 == 10565
replace GB17_outcomeW12 = 2 if districtW12 == 10566
replace GB17_outcomeW12 = 2 if districtW12 == 10567
replace GB17_outcomeW12 = 2 if districtW12 == 10568
replace GB17_outcomeW12 = 2 if districtW12 == 10569
replace GB17_outcomeW12 = 2 if districtW12 == 10570
replace GB17_outcomeW12 = 2 if districtW12 == 10571
replace GB17_outcomeW12 = 1 if districtW12 == 10572
replace GB17_outcomeW12 = 2 if districtW12 == 10573
replace GB17_outcomeW12 = 2 if districtW12 == 30072
replace GB17_outcomeW12 = 2 if districtW12 == 10574
replace GB17_outcomeW12 = 2 if districtW12 == 10575
replace GB17_outcomeW12 = 1 if districtW12 == 10576
replace GB17_outcomeW12 = 2 if districtW12 == 10577
replace GB17_outcomeW12 = 2 if districtW12 == 10578
replace GB17_outcomeW12 = 2 if districtW12 == 10579
replace GB17_outcomeW12 = 1 if districtW12 == 10580
replace GB17_outcomeW12 = 2 if districtW12 == 10581
replace GB17_outcomeW12 = 1 if districtW12 == 10582
replace GB17_outcomeW12 = 1 if districtW12 == 10583
replace GB17_outcomeW12 = 1 if districtW12 == 10584
replace GB17_outcomeW12 = 1 if districtW12 == 10585
replace GB17_outcomeW12 = 1 if districtW12 == 10586
replace GB17_outcomeW12 = 2 if districtW12 == 10587
replace GB17_outcomeW12 = 2 if districtW12 == 10588
replace GB17_outcomeW12 = 2 if districtW12 == 10589
replace GB17_outcomeW12 = 1 if districtW12 == 10590
replace GB17_outcomeW12 = 1 if districtW12 == 30068
replace GB17_outcomeW12 = 2 if districtW12 == 10591
replace GB17_outcomeW12 = 2 if districtW12 == 10593
replace GB17_outcomeW12 = 2 if districtW12 == 10592
replace GB17_outcomeW12 = 1 if districtW12 == 10594
replace GB17_outcomeW12 = 2 if districtW12 == 30073
replace GB17_outcomeW12 = 1 if districtW12 == 10595
replace GB17_outcomeW12 = 1 if districtW12 == 10596
replace GB17_outcomeW12 = 2 if districtW12 == 10597
replace GB17_outcomeW12 = 7 if districtW12 == 10598
replace GB17_outcomeW12 = 2 if districtW12 == 10599
replace GB17_outcomeW12 = 2 if districtW12 == 10600
replace GB17_outcomeW12 = 2 if districtW12 == 10601
replace GB17_outcomeW12 = 2 if districtW12 == 10602
replace GB17_outcomeW12 = 1 if districtW12 == 10603
replace GB17_outcomeW12 = 1 if districtW12 == 10604
replace GB17_outcomeW12 = 1 if districtW12 == 10605
replace GB17_outcomeW12 = 1 if districtW12 == 10606
replace GB17_outcomeW12 = 1 if districtW12 == 10607
replace GB17_outcomeW12 = 1 if districtW12 == 10608
replace GB17_outcomeW12 = 2 if districtW12 == 10609
replace GB17_outcomeW12 = 1 if districtW12 == 10610
replace GB17_outcomeW12 = 2 if districtW12 == 10611
replace GB17_outcomeW12 = 2 if districtW12 == 10612
replace GB17_outcomeW12 = 1 if districtW12 == 10613
replace GB17_outcomeW12 = 2 if districtW12 == 30076
replace GB17_outcomeW12 = 3 if districtW12 == 20009
replace GB17_outcomeW12 = 1 if districtW12 == 10614
replace GB17_outcomeW12 = 2 if districtW12 == 10615
replace GB17_outcomeW12 = 1 if districtW12 == 10616
replace GB17_outcomeW12 = 2 if districtW12 == 10617
replace GB17_outcomeW12 = 1 if districtW12 == 10618
replace GB17_outcomeW12 = 2 if districtW12 == 10619
replace GB17_outcomeW12 = 2 if districtW12 == 30050
replace GB17_outcomeW12 = 2 if districtW12 == 30051
replace GB17_outcomeW12 = 2 if districtW12 == 30080
replace GB17_outcomeW12 = 2 if districtW12 == 30079
replace GB17_outcomeW12 = 1 if districtW12 == 10620
replace GB17_outcomeW12 = 5 if districtW12 == 30067
replace GB17_outcomeW12 = 1 if districtW12 == 30066
replace GB17_outcomeW12 = 3 if districtW12 == 10621
replace GB17_outcomeW12 = 1 if districtW12 == 10622
replace GB17_outcomeW12 = 4 if districtW12 == 20010
replace GB17_outcomeW12 = 1 if districtW12 == 10623
replace GB17_outcomeW12 = 1 if districtW12 == 10624
replace GB17_outcomeW12 = 5 if districtW12 == 30064
replace GB17_outcomeW12 = 1 if districtW12 == 10625
replace GB17_outcomeW12 = 1 if districtW12 == 10626
replace GB17_outcomeW12 = 1 if districtW12 == 10627
replace GB17_outcomeW12 = 1 if districtW12 == 10628
replace GB17_outcomeW12 = 1 if districtW12 == 10629
replace GB17_outcomeW12 = 1 if districtW12 == 10630
replace GB17_outcomeW12 = 1 if districtW12 == 10631
replace GB17_outcomeW12 = 2 if districtW12 == 10632
replace GB17_outcomeW12 = 1 if districtW12 == 10633
replace GB17_outcomeW12 = 1 if districtW12 == 10634
replace GB17_outcomeW12 = 1 if districtW12 == 10635
replace GB17_outcomeW12 = 1 if districtW12 == 10636
replace GB17_outcomeW12 = 2 if districtW12 == 10637
replace GB17_outcomeW12 = 1 if districtW12 == 10638
replace GB17_outcomeW12 = 1 if districtW12 == 10639
replace GB17_outcomeW12 = 2 if districtW12 == 10640
replace GB17_outcomeW12 = 2 if districtW12 == 10641
replace GB17_outcomeW12 = 1 if districtW12 == 10642
replace GB17_outcomeW12 = 1 if districtW12 == 10643
replace GB17_outcomeW12 = 2 if districtW12 == 30062
replace GB17_outcomeW12 = 1 if districtW12 == 30059
replace GB17_outcomeW12 = 2 if districtW12 == 20011
replace GB17_outcomeW12 = 1 if districtW12 == 10644
replace GB17_outcomeW12 = 2 if districtW12 == 10645
replace GB17_outcomeW12 = 1 if districtW12 == 10646
replace GB17_outcomeW12 = 1 if districtW12 == 10647
replace GB17_outcomeW12 = 1 if districtW12 == 10648
replace GB17_outcomeW12 = 2 if districtW12 == 10649
replace GB17_outcomeW12 = 2 if districtW12 == 10650
replace GB17_outcomeW12 = 2 if districtW12 == 10651
replace GB17_outcomeW12 = 1 if districtW12 == 10652
replace GB17_outcomeW12 = 2 if districtW12 == 10653
replace GB17_outcomeW12 = 2 if districtW12 == 10654
replace GB17_outcomeW12 = 2 if districtW12 == 10655
replace GB17_outcomeW12 = 1 if districtW12 == 10656
replace GB17_outcomeW12 = 4 if districtW12 == 20012
replace GB17_outcomeW12 = 2 if districtW12 == 30070
replace GB17_outcomeW12 = 2 if districtW12 == 10657
replace GB17_outcomeW12 = 2 if districtW12 == 10658
replace GB17_outcomeW12 = 1 if districtW12 == 10659
replace GB17_outcomeW12 = 1 if districtW12 == 10660
replace GB17_outcomeW12 = 2 if districtW12 == 30042
replace GB17_outcomeW12 = 2 if districtW12 == 10661
replace GB17_outcomeW12 = 2 if districtW12 == 10662
replace GB17_outcomeW12 = 1 if districtW12 == 10664
replace GB17_outcomeW12 = 2 if districtW12 == 10663
replace GB17_outcomeW12 = 1 if districtW12 == 10665
replace GB17_outcomeW12 = 2 if districtW12 == 10666
replace GB17_outcomeW12 = 2 if districtW12 == 10668
replace GB17_outcomeW12 = 2 if districtW12 == 10669
replace GB17_outcomeW12 = 2 if districtW12 == 10667
replace GB17_outcomeW12 = 1 if districtW12 == 10670
replace GB17_outcomeW12 = 2 if districtW12 == 10671
replace GB17_outcomeW12 = 1 if districtW12 == 10672
replace GB17_outcomeW12 = 2 if districtW12 == 10673
replace GB17_outcomeW12 = 1 if districtW12 == 20013
replace GB17_outcomeW12 = 1 if districtW12 == 20014
replace GB17_outcomeW12 = 4 if districtW12 == 20015
replace GB17_outcomeW12 = 4 if districtW12 == 20016
replace GB17_outcomeW12 = 4 if districtW12 == 20017
replace GB17_outcomeW12 = 5 if districtW12 == 30061
replace GB17_outcomeW12 = 2 if districtW12 == 10674
replace GB17_outcomeW12 = 2 if districtW12 == 10675
replace GB17_outcomeW12 = 2 if districtW12 == 10676
replace GB17_outcomeW12 = 2 if districtW12 == 10677
replace GB17_outcomeW12 = -9999 if districtW12 == 40005
replace GB17_outcomeW12 = 3 if districtW12 == 10684
replace GB17_outcomeW12 = 1 if districtW12 == 10678
replace GB17_outcomeW12 = 3 if districtW12 == 20018
replace GB17_outcomeW12 = 2 if districtW12 == 10679
replace GB17_outcomeW12 = 1 if districtW12 == 10680
replace GB17_outcomeW12 = 4 if districtW12 == 20019
replace GB17_outcomeW12 = 1 if districtW12 == 10685
replace GB17_outcomeW12 = -9999 if districtW12 == 40006
replace GB17_outcomeW12 = 2 if districtW12 == 20020
replace GB17_outcomeW12 = 1 if districtW12 == 20021
replace GB17_outcomeW12 = 1 if districtW12 == 10681
replace GB17_outcomeW12 = 1 if districtW12 == 10682
replace GB17_outcomeW12 = 1 if districtW12 == 10683
replace GB17_outcomeW12 = 1 if districtW12 == 10686
replace GB17_outcomeW12 = 4 if districtW12 == 20022
replace GB17_outcomeW12 = 4 if districtW12 == 20023
replace GB17_outcomeW12 = 2 if districtW12 == 20024
replace GB17_outcomeW12 = 4 if districtW12 == 20025
replace GB17_outcomeW12 = 3 if districtW12 == 20026
replace GB17_outcomeW12 = 2 if districtW12 == 10687
replace GB17_outcomeW12 = 2 if districtW12 == 10688
replace GB17_outcomeW12 = 1 if districtW12 == 10689
replace GB17_outcomeW12 = 2 if districtW12 == 10690
replace GB17_outcomeW12 = 2 if districtW12 == 10691
replace GB17_outcomeW12 = 2 if districtW12 == 10692
replace GB17_outcomeW12 = 1 if districtW12 == 10693
replace GB17_outcomeW12 = 1 if districtW12 == 10694
replace GB17_outcomeW12 = 1 if districtW12 == 10695
replace GB17_outcomeW12 = 2 if districtW12 == 10696
replace GB17_outcomeW12 = 1 if districtW12 == 10697
replace GB17_outcomeW12 = 2 if districtW12 == 10698
replace GB17_outcomeW12 = 4 if districtW12 == 20028
replace GB17_outcomeW12 = 1 if districtW12 == 10699
replace GB17_outcomeW12 = 1 if districtW12 == 10700
replace GB17_outcomeW12 = 2 if districtW12 == 10701
replace GB17_outcomeW12 = -9999 if districtW12 == 40007
replace GB17_outcomeW12 = 1 if districtW12 == 10702
replace GB17_outcomeW12 = 1 if districtW12 == 10703
replace GB17_outcomeW12 = 1 if districtW12 == 10704
replace GB17_outcomeW12 = 1 if districtW12 == 10705
replace GB17_outcomeW12 = -9999 if districtW12 == 40008
replace GB17_outcomeW12 = 1 if districtW12 == 10706
replace GB17_outcomeW12 = 1 if districtW12 == 10707
replace GB17_outcomeW12 = 2 if districtW12 == 10708
replace GB17_outcomeW12 = 2 if districtW12 == 10709
replace GB17_outcomeW12 = 2 if districtW12 == 10710
replace GB17_outcomeW12 = 1 if districtW12 == 10711
replace GB17_outcomeW12 = 4 if districtW12 == 20029
replace GB17_outcomeW12 = 4 if districtW12 == 20030
replace GB17_outcomeW12 = 4 if districtW12 == 20031
replace GB17_outcomeW12 = 2 if districtW12 == 20032
replace GB17_outcomeW12 = 4 if districtW12 == 20033
replace GB17_outcomeW12 = 4 if districtW12 == 20034
replace GB17_outcomeW12 = 4 if districtW12 == 20035
replace GB17_outcomeW12 = 4 if districtW12 == 20036
replace GB17_outcomeW12 = 1 if districtW12 == 10712
replace GB17_outcomeW12 = 1 if districtW12 == 20037
replace GB17_outcomeW12 = 1 if districtW12 == 10713
replace GB17_outcomeW12 = 2 if districtW12 == 30046
replace GB17_outcomeW12 = 1 if districtW12 == 10714
replace GB17_outcomeW12 = 1 if districtW12 == 10715
replace GB17_outcomeW12 = 2 if districtW12 == 10716
replace GB17_outcomeW12 = 1 if districtW12 == 10717
replace GB17_outcomeW12 = 2 if districtW12 == 10718
replace GB17_outcomeW12 = 1 if districtW12 == 10719
replace GB17_outcomeW12 = 2 if districtW12 == 10720
replace GB17_outcomeW12 = 2 if districtW12 == 10721
replace GB17_outcomeW12 = 1 if districtW12 == 10722
replace GB17_outcomeW12 = 2 if districtW12 == 10723
replace GB17_outcomeW12 = 1 if districtW12 == 10724
replace GB17_outcomeW12 = 2 if districtW12 == 10725
replace GB17_outcomeW12 = 2 if districtW12 == 10726
replace GB17_outcomeW12 = 2 if districtW12 == 10727
replace GB17_outcomeW12 = 1 if districtW12 == 10728
replace GB17_outcomeW12 = 1 if districtW12 == 10729
replace GB17_outcomeW12 = 1 if districtW12 == 10730
replace GB17_outcomeW12 = 1 if districtW12 == 10731
replace GB17_outcomeW12 = 2 if districtW12 == 10732
replace GB17_outcomeW12 = 2 if districtW12 == 10733
replace GB17_outcomeW12 = 1 if districtW12 == 10734
replace GB17_outcomeW12 = 1 if districtW12 == 10735
replace GB17_outcomeW12 = 1 if districtW12 == 10736
replace GB17_outcomeW12 = 2 if districtW12 == 10737
replace GB17_outcomeW12 = 1 if districtW12 == 10738
replace GB17_outcomeW12 = 1 if districtW12 == 10739
replace GB17_outcomeW12 = 2 if districtW12 == 10740
replace GB17_outcomeW12 = 1 if districtW12 == 10741
replace GB17_outcomeW12 = 1 if districtW12 == 10742
replace GB17_outcomeW12 = 1 if districtW12 == 10743
replace GB17_outcomeW12 = 1 if districtW12 == 10744
replace GB17_outcomeW12 = 1 if districtW12 == 10745
replace GB17_outcomeW12 = 1 if districtW12 == 10746
replace GB17_outcomeW12 = 2 if districtW12 == 10747
replace GB17_outcomeW12 = 2 if districtW12 == 10748
replace GB17_outcomeW12 = 1 if districtW12 == 10749
replace GB17_outcomeW12 = 2 if districtW12 == 10750
replace GB17_outcomeW12 = 1 if districtW12 == 10751
replace GB17_outcomeW12 = 2 if districtW12 == 10752
replace GB17_outcomeW12 = 1 if districtW12 == 10753
replace GB17_outcomeW12 = 2 if districtW12 == 10754
replace GB17_outcomeW12 = 2 if districtW12 == 10755
replace GB17_outcomeW12 = 2 if districtW12 == 10756
replace GB17_outcomeW12 = 1 if districtW12 == 10757
replace GB17_outcomeW12 = 2 if districtW12 == 10758
replace GB17_outcomeW12 = 2 if districtW12 == 10759
replace GB17_outcomeW12 = 2 if districtW12 == 10760
replace GB17_outcomeW12 = 4 if districtW12 == 20038
replace GB17_outcomeW12 = 4 if districtW12 == 20039
replace GB17_outcomeW12 = 2 if districtW12 == 10761
replace GB17_outcomeW12 = 1 if districtW12 == 10762
replace GB17_outcomeW12 = 2 if districtW12 == 10763
replace GB17_outcomeW12 = 2 if districtW12 == 10764
replace GB17_outcomeW12 = 2 if districtW12 == 30077
replace GB17_outcomeW12 = 2 if districtW12 == 10765
replace GB17_outcomeW12 = 2 if districtW12 == 10766
replace GB17_outcomeW12 = 1 if districtW12 == 10767
replace GB17_outcomeW12 = 2 if districtW12 == 10768
replace GB17_outcomeW12 = 1 if districtW12 == 10769
replace GB17_outcomeW12 = 4 if districtW12 == 20040
replace GB17_outcomeW12 = 3 if districtW12 == 10770
replace GB17_outcomeW12 = 2 if districtW12 == 10771
replace GB17_outcomeW12 = 2 if districtW12 == 10772
replace GB17_outcomeW12 = 2 if districtW12 == 10773
replace GB17_outcomeW12 = 1 if districtW12 == 10774
replace GB17_outcomeW12 = 2 if districtW12 == 20041
replace GB17_outcomeW12 = 2 if districtW12 == 10775
replace GB17_outcomeW12 = -9999 if districtW12 == 40009
replace GB17_outcomeW12 = 4 if districtW12 == 20042
replace GB17_outcomeW12 = 2 if districtW12 == 10776
replace GB17_outcomeW12 = 2 if districtW12 == 10777
replace GB17_outcomeW12 = 2 if districtW12 == 10778
replace GB17_outcomeW12 = 2 if districtW12 == 10779
replace GB17_outcomeW12 = 2 if districtW12 == 10780
replace GB17_outcomeW12 = 2 if districtW12 == 10781
replace GB17_outcomeW12 = 2 if districtW12 == 10782
replace GB17_outcomeW12 = 2 if districtW12 == 10783
replace GB17_outcomeW12 = 2 if districtW12 == 10784
replace GB17_outcomeW12 = 2 if districtW12 == 10785
replace GB17_outcomeW12 = 1 if districtW12 == 10786
replace GB17_outcomeW12 = 2 if districtW12 == 10789
replace GB17_outcomeW12 = 2 if districtW12 == 10787
replace GB17_outcomeW12 = 2 if districtW12 == 10788
replace GB17_outcomeW12 = 2 if districtW12 == 10790
replace GB17_outcomeW12 = 1 if districtW12 == 10791
replace GB17_outcomeW12 = 2 if districtW12 == 10792
replace GB17_outcomeW12 = 4 if districtW12 == 20043
replace GB17_outcomeW12 = 2 if districtW12 == 10793
replace GB17_outcomeW12 = 2 if districtW12 == 10794
replace GB17_outcomeW12 = 2 if districtW12 == 10795
replace GB17_outcomeW12 = 2 if districtW12 == 10796
replace GB17_outcomeW12 = 4 if districtW12 == 20044
replace GB17_outcomeW12 = 2 if districtW12 == 30045
replace GB17_outcomeW12 = 1 if districtW12 == 10797
replace GB17_outcomeW12 = 1 if districtW12 == 10798
replace GB17_outcomeW12 = 1 if districtW12 == 10799
replace GB17_outcomeW12 = 2 if districtW12 == 10800
replace GB17_outcomeW12 = 2 if districtW12 == 10801
replace GB17_outcomeW12 = 1 if districtW12 == 10802
replace GB17_outcomeW12 = 1 if districtW12 == 10803
replace GB17_outcomeW12 = 1 if districtW12 == 10804
replace GB17_outcomeW12 = 2 if districtW12 == 10805
replace GB17_outcomeW12 = 1 if districtW12 == 10806
replace GB17_outcomeW12 = 2 if districtW12 == 10807
replace GB17_outcomeW12 = 2 if districtW12 == 10808
replace GB17_outcomeW12 = 2 if districtW12 == 10809
replace GB17_outcomeW12 = 1 if districtW12 == 10810
replace GB17_outcomeW12 = 1 if districtW12 == 10811
replace GB17_outcomeW12 = 1 if districtW12 == 10812
replace GB17_outcomeW12 = 2 if districtW12 == 30071
replace GB17_outcomeW12 = 1 if districtW12 == 10813
replace GB17_outcomeW12 = 1 if districtW12 == 10814
replace GB17_outcomeW12 = 2 if districtW12 == 10819
replace GB17_outcomeW12 = 1 if districtW12 == 10820
replace GB17_outcomeW12 = 1 if districtW12 == 10815
replace GB17_outcomeW12 = 2 if districtW12 == 20045
replace GB17_outcomeW12 = 1 if districtW12 == 10816
replace GB17_outcomeW12 = 1 if districtW12 == 10817
replace GB17_outcomeW12 = -9999 if districtW12 == 40010
replace GB17_outcomeW12 = 1 if districtW12 == 10818
replace GB17_outcomeW12 = 1 if districtW12 == 10821
replace GB17_outcomeW12 = 1 if districtW12 == 10822
replace GB17_outcomeW12 = 2 if districtW12 == 10823
replace GB17_outcomeW12 = 1 if districtW12 == 10824
replace GB17_outcomeW12 = 1 if districtW12 == 30054
replace GB17_outcomeW12 = 1 if districtW12 == 30063
replace GB17_outcomeW12 = 1 if districtW12 == 20046
replace GB17_outcomeW12 = 1 if districtW12 == 10825
replace GB17_outcomeW12 = 1 if districtW12 == 10826
replace GB17_outcomeW12 = 4 if districtW12 == 20047
replace GB17_outcomeW12 = 4 if districtW12 == 20027
replace GB17_outcomeW12 = 2 if districtW12 == 30069
replace GB17_outcomeW12 = 1 if districtW12 == 10829
replace GB17_outcomeW12 = 1 if districtW12 == 10830
replace GB17_outcomeW12 = 2 if districtW12 == 10834
replace GB17_outcomeW12 = 2 if districtW12 == 10831
replace GB17_outcomeW12 = 2 if districtW12 == 10832
replace GB17_outcomeW12 = 2 if districtW12 == 10833
replace GB17_outcomeW12 = 1 if districtW12 == 10827
replace GB17_outcomeW12 = 1 if districtW12 == 10828
replace GB17_outcomeW12 = 2 if districtW12 == 30055
replace GB17_outcomeW12 = 2 if districtW12 == 30056
replace GB17_outcomeW12 = -9999 if districtW12 == 40011
replace GB17_outcomeW12 = 1 if districtW12 == 10835
replace GB17_outcomeW12 = 2 if districtW12 == 10836
replace GB17_outcomeW12 = 1 if districtW12 == 10861
replace GB17_outcomeW12 = 1 if districtW12 == 10862
replace GB17_outcomeW12 = -9999 if districtW12 == 40012
replace GB17_outcomeW12 = 4 if districtW12 == 20048
replace GB17_outcomeW12 = 1 if districtW12 == 10837
replace GB17_outcomeW12 = 1 if districtW12 == 10838
replace GB17_outcomeW12 = 1 if districtW12 == 10839
replace GB17_outcomeW12 = -9999 if districtW12 == 40013
replace GB17_outcomeW12 = 2 if districtW12 == 10840
replace GB17_outcomeW12 = 1 if districtW12 == 10841
replace GB17_outcomeW12 = 1 if districtW12 == 10842
replace GB17_outcomeW12 = 1 if districtW12 == 10843
replace GB17_outcomeW12 = 4 if districtW12 == 20049
replace GB17_outcomeW12 = 1 if districtW12 == 10844
replace GB17_outcomeW12 = 1 if districtW12 == 10845
replace GB17_outcomeW12 = 1 if districtW12 == 10846
replace GB17_outcomeW12 = 1 if districtW12 == 10847
replace GB17_outcomeW12 = 3 if districtW12 == 10848
replace GB17_outcomeW12 = 1 if districtW12 == 10849
replace GB17_outcomeW12 = 1 if districtW12 == 10850
replace GB17_outcomeW12 = 1 if districtW12 == 10851
replace GB17_outcomeW12 = 1 if districtW12 == 10852
replace GB17_outcomeW12 = 2 if districtW12 == 10853
replace GB17_outcomeW12 = 1 if districtW12 == 10854
replace GB17_outcomeW12 = 1 if districtW12 == 10855
replace GB17_outcomeW12 = 2 if districtW12 == 10856
replace GB17_outcomeW12 = 1 if districtW12 == 10857
replace GB17_outcomeW12 = 1 if districtW12 == 10858
replace GB17_outcomeW12 = 1 if districtW12 == 10859
replace GB17_outcomeW12 = 1 if districtW12 == 10860
replace GB17_outcomeW12 = 1 if districtW12 == 10863
replace GB17_outcomeW12 = 2 if districtW12 == 10864
replace GB17_outcomeW12 = 2 if districtW12 == 10865
replace GB17_outcomeW12 = 2 if districtW12 == 10866
replace GB17_outcomeW12 = 2 if districtW12 == 10867
replace GB17_outcomeW12 = 1 if districtW12 == 10868
replace GB17_outcomeW12 = 1 if districtW12 == 20050
replace GB17_outcomeW12 = 2 if districtW12 == 30074
replace GB17_outcomeW12 = 1 if districtW12 == 10869
replace GB17_outcomeW12 = 2 if districtW12 == 10870
replace GB17_outcomeW12 = 2 if districtW12 == 10871
replace GB17_outcomeW12 = 3 if districtW12 == 20051
replace GB17_outcomeW12 = 1 if districtW12 == 10872
replace GB17_outcomeW12 = 2 if districtW12 == 10873
replace GB17_outcomeW12 = 3 if districtW12 == 10874
replace GB17_outcomeW12 = 4 if districtW12 == 20052
replace GB17_outcomeW12 = 4 if districtW12 == 20053
replace GB17_outcomeW12 = 1 if districtW12 == 10875
replace GB17_outcomeW12 = 2 if districtW12 == 10876
replace GB17_outcomeW12 = 1 if districtW12 == 10877
replace GB17_outcomeW12 = 4 if districtW12 == 20054
replace GB17_outcomeW12 = 2 if districtW12 == 10878
replace GB17_outcomeW12 = 1 if districtW12 == 10879
replace GB17_outcomeW12 = 2 if districtW12 == 10880
replace GB17_outcomeW12 = 2 if districtW12 == 30075
replace GB17_outcomeW12 = 1 if districtW12 == 10881
replace GB17_outcomeW12 = 2 if districtW12 == 10882
replace GB17_outcomeW12 = 1 if districtW12 == 10883
replace GB17_outcomeW12 = 2 if districtW12 == 10884
replace GB17_outcomeW12 = 1 if districtW12 == 30065
replace GB17_outcomeW12 = 2 if districtW12 == 10885
replace GB17_outcomeW12 = 1 if districtW12 == 10886
replace GB17_outcomeW12 = 1 if districtW12 == 10887
replace GB17_outcomeW12 = 1 if districtW12 == 10888
replace GB17_outcomeW12 = 2 if districtW12 == 10889
replace GB17_outcomeW12 = 1 if districtW12 == 10890
replace GB17_outcomeW12 = 2 if districtW12 == 10891
replace GB17_outcomeW12 = 1 if districtW12 == 10892
replace GB17_outcomeW12 = 1 if districtW12 == 10893
replace GB17_outcomeW12 = 2 if districtW12 == 30052
replace GB17_outcomeW12 = 1 if districtW12 == 10894
replace GB17_outcomeW12 = 1 if districtW12 == 10896
replace GB17_outcomeW12 = 1 if districtW12 == 10895
replace GB17_outcomeW12 = 2 if districtW12 == 10897
replace GB17_outcomeW12 = 1 if districtW12 == 10898
replace GB17_outcomeW12 = 1 if districtW12 == 10899
replace GB17_outcomeW12 = 1 if districtW12 == 10900
replace GB17_outcomeW12 = 1 if districtW12 == 10901
replace GB17_outcomeW12 = 1 if districtW12 == 10902
replace GB17_outcomeW12 = 4 if districtW12 == 20055
replace GB17_outcomeW12 = 2 if districtW12 == 10904
replace GB17_outcomeW12 = 2 if districtW12 == 10903
replace GB17_outcomeW12 = 1 if districtW12 == 10905
replace GB17_outcomeW12 = 1 if districtW12 == 10906
replace GB17_outcomeW12 = 1 if districtW12 == 10907
replace GB17_outcomeW12 = 1 if districtW12 == 10908
replace GB17_outcomeW12 = 2 if districtW12 == 20056
replace GB17_outcomeW12 = 1 if districtW12 == 10909
replace GB17_outcomeW12 = 1 if districtW12 == 10910
replace GB17_outcomeW12 = 2 if districtW12 == 10911
replace GB17_outcomeW12 = 1 if districtW12 == 10912
replace GB17_outcomeW12 = 1 if districtW12 == 10913
replace GB17_outcomeW12 = 2 if districtW12 == 10914
replace GB17_outcomeW12 = 2 if districtW12 == 10915
replace GB17_outcomeW12 = 2 if districtW12 == 10916
replace GB17_outcomeW12 = 1 if districtW12 == 10917
replace GB17_outcomeW12 = 1 if districtW12 == 10918
replace GB17_outcomeW12 = 2 if districtW12 == 10921
replace GB17_outcomeW12 = 2 if districtW12 == 10919
replace GB17_outcomeW12 = 2 if districtW12 == 10922
replace GB17_outcomeW12 = 2 if districtW12 == 10923
replace GB17_outcomeW12 = 2 if districtW12 == 10920
replace GB17_outcomeW12 = 1 if districtW12 == 10924
replace GB17_outcomeW12 = 1 if districtW12 == 10925
replace GB17_outcomeW12 = 1 if districtW12 == 10926
replace GB17_outcomeW12 = 1 if districtW12 == 10927
replace GB17_outcomeW12 = 1 if districtW12 == 10928
replace GB17_outcomeW12 = 1 if districtW12 == 10929
replace GB17_outcomeW12 = 2 if districtW12 == 10930
replace GB17_outcomeW12 = 1 if districtW12 == 10931
replace GB17_outcomeW12 = 1 if districtW12 == 10932
replace GB17_outcomeW12 = 1 if districtW12 == 10955
replace GB17_outcomeW12 = 2 if districtW12 == 10956
replace GB17_outcomeW12 = -9999 if districtW12 == 40014
replace GB17_outcomeW12 = 1 if districtW12 == 10933
replace GB17_outcomeW12 = 1 if districtW12 == 10934
replace GB17_outcomeW12 = 1 if districtW12 == 10935
replace GB17_outcomeW12 = 1 if districtW12 == 10936
replace GB17_outcomeW12 = -9999 if districtW12 == 40015
replace GB17_outcomeW12 = 1 if districtW12 == 10937
replace GB17_outcomeW12 = 1 if districtW12 == 10938
replace GB17_outcomeW12 = 1 if districtW12 == 10957
replace GB17_outcomeW12 = 1 if districtW12 == 10939
replace GB17_outcomeW12 = 1 if districtW12 == 10940
replace GB17_outcomeW12 = 1 if districtW12 == 10941
replace GB17_outcomeW12 = 1 if districtW12 == 10942
replace GB17_outcomeW12 = 1 if districtW12 == 10958
replace GB17_outcomeW12 = 1 if districtW12 == 10943
replace GB17_outcomeW12 = 2 if districtW12 == 10944
replace GB17_outcomeW12 = 1 if districtW12 == 10945
replace GB17_outcomeW12 = 1 if districtW12 == 10946
replace GB17_outcomeW12 = 1 if districtW12 == 10947
replace GB17_outcomeW12 = 1 if districtW12 == 10948
replace GB17_outcomeW12 = 1 if districtW12 == 10949
replace GB17_outcomeW12 = 1 if districtW12 == 10950
replace GB17_outcomeW12 = 1 if districtW12 == 10951
replace GB17_outcomeW12 = 1 if districtW12 == 10952
replace GB17_outcomeW12 = 1 if districtW12 == 10953
replace GB17_outcomeW12 = 1 if districtW12 == 10954
replace GB17_outcomeW12 = 1 if districtW12 == 10959
replace GB17_outcomeW12 = 1 if districtW12 == 10965
replace GB17_outcomeW12 = 1 if districtW12 == 10966
replace GB17_outcomeW12 = 1 if districtW12 == 10960
replace GB17_outcomeW12 = 2 if districtW12 == 10967
replace GB17_outcomeW12 = 1 if districtW12 == 10961
replace GB17_outcomeW12 = 1 if districtW12 == 10968
replace GB17_outcomeW12 = 2 if districtW12 == 10962
replace GB17_outcomeW12 = 2 if districtW12 == 10963
replace GB17_outcomeW12 = 1 if districtW12 == 20057
replace GB17_outcomeW12 = 1 if districtW12 == 10964
replace GB17_outcomeW12 = 2 if districtW12 == 10969
replace GB17_outcomeW12 = 2 if districtW12 == 10970
replace GB17_outcomeW12 = 2 if districtW12 == 10971
replace GB17_outcomeW12 = 2 if districtW12 == 10972
replace GB17_outcomeW12 = 2 if districtW12 == 10973
replace GB17_outcomeW12 = 1 if districtW12 == 10974
replace GB17_outcomeW12 = 1 if districtW12 == 10975
replace GB17_outcomeW12 = 1 if districtW12 == 10976
replace GB17_outcomeW12 = -9999 if districtW12 == 40016
replace GB17_outcomeW12 = 1 if districtW12 == 10977
replace GB17_outcomeW12 = 2 if districtW12 == 10978
replace GB17_outcomeW12 = 2 if districtW12 == 10979
replace GB17_outcomeW12 = 2 if districtW12 == 10980
replace GB17_outcomeW12 = 1 if districtW12 == 10981
replace GB17_outcomeW12 = 2 if districtW12 == 10982
replace GB17_outcomeW12 = 1 if districtW12 == 10983
replace GB17_outcomeW12 = 1 if districtW12 == 10984
replace GB17_outcomeW12 = 1 if districtW12 == 10985
replace GB17_outcomeW12 = 2 if districtW12 == 30048
replace GB17_outcomeW12 = 2 if districtW12 == 30047
replace GB17_outcomeW12 = 1 if districtW12 == 10986
replace GB17_outcomeW12 = 1 if districtW12 == 10987
replace GB17_outcomeW12 = 1 if districtW12 == 10988
replace GB17_outcomeW12 = 1 if districtW12 == 10989
replace GB17_outcomeW12 = 1 if districtW12 == 10990
replace GB17_outcomeW12 = 1 if districtW12 == 10991
replace GB17_outcomeW12 = 1 if districtW12 == 10992
replace GB17_outcomeW12 = 1 if districtW12 == 10993
replace GB17_outcomeW12 = 1 if districtW12 == 10994
replace GB17_outcomeW12 = 1 if districtW12 == 10995
replace GB17_outcomeW12 = 1 if districtW12 == 10996
replace GB17_outcomeW12 = 1 if districtW12 == 10997
replace GB17_outcomeW12 = 2 if districtW12 == 10998
replace GB17_outcomeW12 = 1 if districtW12 == 10999
replace GB17_outcomeW12 = 2 if districtW12 == 30053
replace GB17_outcomeW12 = 1 if districtW12 == 11000
replace GB17_outcomeW12 = 1 if districtW12 == 11001
replace GB17_outcomeW12 = 2 if districtW12 == 11002
replace GB17_outcomeW12 = 1 if districtW12 == 11003
replace GB17_outcomeW12 = 1 if districtW12 == 11004
replace GB17_outcomeW12 = 3 if districtW12 == 11005
replace GB17_outcomeW12 = 2 if districtW12 == 11006
replace GB17_outcomeW12 = -9999 if districtW12 == 40017
replace GB17_outcomeW12 = 1 if districtW12 == 11007
replace GB17_outcomeW12 = 2 if districtW12 == 30060
replace GB17_outcomeW12 = 1 if districtW12 == 30078
replace GB17_outcomeW12 = 2 if districtW12 == 11008
replace GB17_outcomeW12 = 2 if districtW12 == 11009
replace GB17_outcomeW12 = 2 if districtW12 == 11010
replace GB17_outcomeW12 = 1 if districtW12 == 11011
replace GB17_outcomeW12 = 2 if districtW12 == 11012
replace GB17_outcomeW12 = 2 if districtW12 == 11013
replace GB17_outcomeW12 = 2 if districtW12 == 11014
replace GB17_outcomeW12 = 1 if districtW12 == 11015
replace GB17_outcomeW12 = 2 if districtW12 == 11016
replace GB17_outcomeW12 = 2 if districtW12 == 11017
replace GB17_outcomeW12 = 2 if districtW12 == 11018
replace GB17_outcomeW12 = 2 if districtW12 == 11019
replace GB17_outcomeW12 = 2 if districtW12 == 11020
replace GB17_outcomeW12 = 1 if districtW12 == 11021
replace GB17_outcomeW12 = 1 if districtW12 == 11022
replace GB17_outcomeW12 = 1 if districtW12 == 11023
replace GB17_outcomeW12 = 2 if districtW12 == 11024
replace GB17_outcomeW12 = 1 if districtW12 == 11025
replace GB17_outcomeW12 = 1 if districtW12 == 11026
replace GB17_outcomeW12 = 1 if districtW12 == 11027
replace GB17_outcomeW12 = 2 if districtW12 == 11028
replace GB17_outcomeW12 = 1 if districtW12 == 20058
replace GB17_outcomeW12 = 2 if districtW12 == 11029
replace GB17_outcomeW12 = 2 if districtW12 == 11030
replace GB17_outcomeW12 = 1 if districtW12 == 11031
replace GB17_outcomeW12 = 4 if districtW12 == 20059
replace GB17_outcomeW12 = 2 if districtW12 == 11032
replace GB17_outcomeW12 = 2 if districtW12 == 11033
replace GB17_outcomeW12 = 2 if districtW12 == 11036
replace GB17_outcomeW12 = 3 if districtW12 == 11037
replace GB17_outcomeW12 = 1 if districtW12 == 11038
replace GB17_outcomeW12 = 1 if districtW12 == 11034
replace GB17_outcomeW12 = -9999 if districtW12 == 40018
replace GB17_outcomeW12 = 1 if districtW12 == 11035
replace GB17_outcomeW12 = 2 if districtW12 == 11039
replace GB17_outcomeW12 = 1 if districtW12 == 11040
replace GB17_outcomeW12 = 1 if districtW12 == 11041
replace GB17_outcomeW12 = 1 if districtW12 == 11042
replace GB17_outcomeW12 = 2 if districtW12 == 11043
replace GB17_outcomeW12 = 2 if districtW12 == 11044
replace GB17_outcomeW12 = 1 if districtW12 == 11045
replace GB17_outcomeW12 = 1 if districtW12 == 11046
replace GB17_outcomeW12 = 1 if districtW12 == 11047
replace GB17_outcomeW12 = 1 if districtW12 == 11048
replace GB17_outcomeW12 = 2 if districtW12 == 11049
replace GB17_outcomeW12 = 2 if districtW12 == 11050
replace GB17_outcomeW12 = 2 if districtW12 == 11051
replace GB17_outcomeW12 = 1 if districtW12 == 11052
replace GB17_outcomeW12 = 2 if districtW12 == 11053
replace GB17_outcomeW12 = 2 if districtW12 == 11054
replace GB17_outcomeW12 = 1 if districtW12 == 11055
replace GB17_outcomeW12 = 2 if districtW12 == 30044
replace GB17_outcomeW12 = 1 if districtW12 == 11056
replace GB17_outcomeW12 = 1 if districtW12 == 11057
replace GB17_outcomeW12 = 1 if districtW12 == 11058
replace GB17_outcomeW12 = 2 if districtW12 == 11059
replace GB17_outcomeW12 = 1 if districtW12 == 11060
replace GB17_outcomeW12 = 2 if districtW12 == 30041
replace GB17_outcomeW12 = 2 if districtW12 == 11061
replace GB17_outcomeW12 = 1 if districtW12 == 11062


****************************************************
** DISTRICT-LEVEL OUTCOMES: 2019 GENERAL ELECTION **
****************************************************

* Note: 1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = SNP, 5 = Plaid Cymru, 6 = UKIP, 7 = Green Party, 8 = BNP, 9 = other party, 11 = Change UK – The Independent Group, 12 = Brexit Party, 13 = independent, -9999 = Northern Ireland party

gen GB19_outcomeW17 = .

replace GB19_outcomeW17 = 2 if districtW17 == 30049
replace GB19_outcomeW17 = 1 if districtW17 == 30058
replace GB19_outcomeW17 = 4 if districtW17 == 20001
replace GB19_outcomeW17 = 4 if districtW17 == 20002
replace GB19_outcomeW17 = 4 if districtW17 == 20003
replace GB19_outcomeW17 = 1 if districtW17 == 10530
replace GB19_outcomeW17 = 1 if districtW17 == 10531
replace GB19_outcomeW17 = 1 if districtW17 == 10532
replace GB19_outcomeW17 = 2 if districtW17 == 30043
replace GB19_outcomeW17 = 1 if districtW17 == 10533
replace GB19_outcomeW17 = 4 if districtW17 == 20004
replace GB19_outcomeW17 = 5 if districtW17 == 30057
replace GB19_outcomeW17 = 4 if districtW17 == 20005
replace GB19_outcomeW17 = 1 if districtW17 == 10534
replace GB19_outcomeW17 = 1 if districtW17 == 10535
replace GB19_outcomeW17 = 1 if districtW17 == 10536
replace GB19_outcomeW17 = 2 if districtW17 == 10537
replace GB19_outcomeW17 = 1 if districtW17 == 10538
replace GB19_outcomeW17 = 4 if districtW17 == 20006
replace GB19_outcomeW17 = 1 if districtW17 == 10539
replace GB19_outcomeW17 = 1 if districtW17 == 20007
replace GB19_outcomeW17 = 2 if districtW17 == 10540
replace GB19_outcomeW17 = 2 if districtW17 == 10541
replace GB19_outcomeW17 = 2 if districtW17 == 10542
replace GB19_outcomeW17 = 1 if districtW17 == 10543
replace GB19_outcomeW17 = 1 if districtW17 == 10544
replace GB19_outcomeW17 = 1 if districtW17 == 10545
replace GB19_outcomeW17 = 1 if districtW17 == 10546
replace GB19_outcomeW17 = 3 if districtW17 == 10547
replace GB19_outcomeW17 = 2 if districtW17 == 10548
replace GB19_outcomeW17 = 2 if districtW17 == 10549
replace GB19_outcomeW17 = 1 if districtW17 == 10550
replace GB19_outcomeW17 = 1 if districtW17 == 10551
replace GB19_outcomeW17 = 2 if districtW17 == 10552
replace GB19_outcomeW17 = -9999 if districtW17 == 40001
replace GB19_outcomeW17 = -9999 if districtW17 == 40002
replace GB19_outcomeW17 = -9999 if districtW17 == 40003
replace GB19_outcomeW17 = -9999 if districtW17 == 40004
replace GB19_outcomeW17 = 2 if districtW17 == 10553
replace GB19_outcomeW17 = 1 if districtW17 == 20008
replace GB19_outcomeW17 = 1 if districtW17 == 10554
replace GB19_outcomeW17 = 2 if districtW17 == 10555
replace GB19_outcomeW17 = 1 if districtW17 == 10556
replace GB19_outcomeW17 = 1 if districtW17 == 10557
replace GB19_outcomeW17 = 1 if districtW17 == 10558
replace GB19_outcomeW17 = 2 if districtW17 == 10559
replace GB19_outcomeW17 = 2 if districtW17 == 10560
replace GB19_outcomeW17 = 2 if districtW17 == 10561
replace GB19_outcomeW17 = 2 if districtW17 == 10562
replace GB19_outcomeW17 = 2 if districtW17 == 10563
replace GB19_outcomeW17 = 2 if districtW17 == 10564
replace GB19_outcomeW17 = 1 if districtW17 == 10565
replace GB19_outcomeW17 = 2 if districtW17 == 10566
replace GB19_outcomeW17 = 2 if districtW17 == 10567
replace GB19_outcomeW17 = 2 if districtW17 == 10568
replace GB19_outcomeW17 = 1 if districtW17 == 10569
replace GB19_outcomeW17 = 2 if districtW17 == 10570
replace GB19_outcomeW17 = 2 if districtW17 == 10571
replace GB19_outcomeW17 = 1 if districtW17 == 10572
replace GB19_outcomeW17 = 1 if districtW17 == 10573
replace GB19_outcomeW17 = 2 if districtW17 == 30072
replace GB19_outcomeW17 = 2 if districtW17 == 10574
replace GB19_outcomeW17 = 1 if districtW17 == 10575
replace GB19_outcomeW17 = 1 if districtW17 == 10576
replace GB19_outcomeW17 = 1 if districtW17 == 10577
replace GB19_outcomeW17 = 1 if districtW17 == 10578
replace GB19_outcomeW17 = 2 if districtW17 == 10579
replace GB19_outcomeW17 = 1 if districtW17 == 10580
replace GB19_outcomeW17 = 2 if districtW17 == 10581
replace GB19_outcomeW17 = 1 if districtW17 == 10582
replace GB19_outcomeW17 = 1 if districtW17 == 10583
replace GB19_outcomeW17 = 1 if districtW17 == 10584
replace GB19_outcomeW17 = 1 if districtW17 == 10585
replace GB19_outcomeW17 = 1 if districtW17 == 10586
replace GB19_outcomeW17 = 2 if districtW17 == 10587
replace GB19_outcomeW17 = 2 if districtW17 == 10588
replace GB19_outcomeW17 = 2 if districtW17 == 10589
replace GB19_outcomeW17 = 1 if districtW17 == 10590
replace GB19_outcomeW17 = 1 if districtW17 == 30068
replace GB19_outcomeW17 = 2 if districtW17 == 10591
replace GB19_outcomeW17 = 2 if districtW17 == 10593
replace GB19_outcomeW17 = 2 if districtW17 == 10592
replace GB19_outcomeW17 = 1 if districtW17 == 10594
replace GB19_outcomeW17 = 1 if districtW17 == 30073
replace GB19_outcomeW17 = 1 if districtW17 == 10595
replace GB19_outcomeW17 = 1 if districtW17 == 10596
replace GB19_outcomeW17 = 2 if districtW17 == 10597
replace GB19_outcomeW17 = 7 if districtW17 == 10598
replace GB19_outcomeW17 = 2 if districtW17 == 10599
replace GB19_outcomeW17 = 2 if districtW17 == 10600
replace GB19_outcomeW17 = 2 if districtW17 == 10601
replace GB19_outcomeW17 = 2 if districtW17 == 10602
replace GB19_outcomeW17 = 1 if districtW17 == 10603
replace GB19_outcomeW17 = 1 if districtW17 == 10604
replace GB19_outcomeW17 = 1 if districtW17 == 10605
replace GB19_outcomeW17 = 1 if districtW17 == 10606
replace GB19_outcomeW17 = 1 if districtW17 == 10607
replace GB19_outcomeW17 = 1 if districtW17 == 10608
replace GB19_outcomeW17 = 1 if districtW17 == 10609
replace GB19_outcomeW17 = 1 if districtW17 == 10610
replace GB19_outcomeW17 = 1 if districtW17 == 10611
replace GB19_outcomeW17 = 1 if districtW17 == 10612
replace GB19_outcomeW17 = 1 if districtW17 == 10613
replace GB19_outcomeW17 = 2 if districtW17 == 30076
replace GB19_outcomeW17 = 3 if districtW17 == 20009
replace GB19_outcomeW17 = 1 if districtW17 == 10614
replace GB19_outcomeW17 = 2 if districtW17 == 10615
replace GB19_outcomeW17 = 1 if districtW17 == 10616
replace GB19_outcomeW17 = 2 if districtW17 == 10617
replace GB19_outcomeW17 = 1 if districtW17 == 10618
replace GB19_outcomeW17 = 2 if districtW17 == 10619
replace GB19_outcomeW17 = 2 if districtW17 == 30050
replace GB19_outcomeW17 = 2 if districtW17 == 30051
replace GB19_outcomeW17 = 2 if districtW17 == 30080
replace GB19_outcomeW17 = 2 if districtW17 == 30079
replace GB19_outcomeW17 = 1 if districtW17 == 10620
replace GB19_outcomeW17 = 5 if districtW17 == 30067
replace GB19_outcomeW17 = 1 if districtW17 == 30066
replace GB19_outcomeW17 = 1 if districtW17 == 10621
replace GB19_outcomeW17 = 1 if districtW17 == 10622
replace GB19_outcomeW17 = 4 if districtW17 == 20010
replace GB19_outcomeW17 = 1 if districtW17 == 10623
replace GB19_outcomeW17 = 1 if districtW17 == 10624
replace GB19_outcomeW17 = 5 if districtW17 == 30064
replace GB19_outcomeW17 = 1 if districtW17 == 10625
replace GB19_outcomeW17 = 1 if districtW17 == 10626
replace GB19_outcomeW17 = 1 if districtW17 == 10627
replace GB19_outcomeW17 = 1 if districtW17 == 10628
replace GB19_outcomeW17 = 1 if districtW17 == 10629
replace GB19_outcomeW17 = 1 if districtW17 == 10630
replace GB19_outcomeW17 = 1 if districtW17 == 10631
replace GB19_outcomeW17 = 2 if districtW17 == 10632
replace GB19_outcomeW17 = 1 if districtW17 == 10633
replace GB19_outcomeW17 = 1 if districtW17 == 10634
replace GB19_outcomeW17 = 1 if districtW17 == 10635
replace GB19_outcomeW17 = 1 if districtW17 == 10636
replace GB19_outcomeW17 = 2 if districtW17 == 10637
replace GB19_outcomeW17 = 1 if districtW17 == 10638
replace GB19_outcomeW17 = 1 if districtW17 == 10639
replace GB19_outcomeW17 = 2 if districtW17 == 10640
replace GB19_outcomeW17 = 2 if districtW17 == 10641
replace GB19_outcomeW17 = 1 if districtW17 == 10642
replace GB19_outcomeW17 = 1 if districtW17 == 10643
replace GB19_outcomeW17 = 1 if districtW17 == 30062
replace GB19_outcomeW17 = 1 if districtW17 == 30059
replace GB19_outcomeW17 = 4 if districtW17 == 20011
replace GB19_outcomeW17 = 1 if districtW17 == 10644
replace GB19_outcomeW17 = 1 if districtW17 == 10645
replace GB19_outcomeW17 = 1 if districtW17 == 10646
replace GB19_outcomeW17 = 1 if districtW17 == 10647
replace GB19_outcomeW17 = 1 if districtW17 == 10648
replace GB19_outcomeW17 = 2 if districtW17 == 10649
replace GB19_outcomeW17 = 2 if districtW17 == 10650
replace GB19_outcomeW17 = 2 if districtW17 == 10651
replace GB19_outcomeW17 = 1 if districtW17 == 10652
replace GB19_outcomeW17 = 1 if districtW17 == 10653
replace GB19_outcomeW17 = 2 if districtW17 == 10654
replace GB19_outcomeW17 = 2 if districtW17 == 10655
replace GB19_outcomeW17 = 1 if districtW17 == 10656
replace GB19_outcomeW17 = 4 if districtW17 == 20012
replace GB19_outcomeW17 = 2 if districtW17 == 30070
replace GB19_outcomeW17 = 2 if districtW17 == 10657
replace GB19_outcomeW17 = 1 if districtW17 == 10658
replace GB19_outcomeW17 = 1 if districtW17 == 10659
replace GB19_outcomeW17 = 1 if districtW17 == 10660
replace GB19_outcomeW17 = 1 if districtW17 == 30042
replace GB19_outcomeW17 = 2 if districtW17 == 10661
replace GB19_outcomeW17 = 1 if districtW17 == 10662
replace GB19_outcomeW17 = 1 if districtW17 == 10664
replace GB19_outcomeW17 = 2 if districtW17 == 10663
replace GB19_outcomeW17 = 1 if districtW17 == 10665
replace GB19_outcomeW17 = 1 if districtW17 == 10666
replace GB19_outcomeW17 = 2 if districtW17 == 10668
replace GB19_outcomeW17 = 2 if districtW17 == 10669
replace GB19_outcomeW17 = 1 if districtW17 == 10667
replace GB19_outcomeW17 = 1 if districtW17 == 10670
replace GB19_outcomeW17 = 1 if districtW17 == 10671
replace GB19_outcomeW17 = 1 if districtW17 == 10672
replace GB19_outcomeW17 = 2 if districtW17 == 10673
replace GB19_outcomeW17 = 1 if districtW17 == 20013
replace GB19_outcomeW17 = 1 if districtW17 == 20014
replace GB19_outcomeW17 = 4 if districtW17 == 20015
replace GB19_outcomeW17 = 4 if districtW17 == 20016
replace GB19_outcomeW17 = 4 if districtW17 == 20017
replace GB19_outcomeW17 = 5 if districtW17 == 30061
replace GB19_outcomeW17 = 2 if districtW17 == 10674
replace GB19_outcomeW17 = 2 if districtW17 == 10675
replace GB19_outcomeW17 = 2 if districtW17 == 10676
replace GB19_outcomeW17 = 2 if districtW17 == 10677
replace GB19_outcomeW17 = -9999 if districtW17 == 40005
replace GB19_outcomeW17 = 1 if districtW17 == 10684
replace GB19_outcomeW17 = 1 if districtW17 == 10678
replace GB19_outcomeW17 = 4 if districtW17 == 20018
replace GB19_outcomeW17 = 2 if districtW17 == 10679
replace GB19_outcomeW17 = 1 if districtW17 == 10680
replace GB19_outcomeW17 = 4 if districtW17 == 20019
replace GB19_outcomeW17 = 1 if districtW17 == 10685
replace GB19_outcomeW17 = -9999 if districtW17 == 40006
replace GB19_outcomeW17 = 4 if districtW17 == 20020
replace GB19_outcomeW17 = 4 if districtW17 == 20021
replace GB19_outcomeW17 = 1 if districtW17 == 10681
replace GB19_outcomeW17 = 1 if districtW17 == 10682
replace GB19_outcomeW17 = 1 if districtW17 == 10683
replace GB19_outcomeW17 = 1 if districtW17 == 10686
replace GB19_outcomeW17 = 4 if districtW17 == 20022
replace GB19_outcomeW17 = 4 if districtW17 == 20023
replace GB19_outcomeW17 = 2 if districtW17 == 20024
replace GB19_outcomeW17 = 4 if districtW17 == 20025
replace GB19_outcomeW17 = 3 if districtW17 == 20026
replace GB19_outcomeW17 = 2 if districtW17 == 10687
replace GB19_outcomeW17 = 2 if districtW17 == 10688
replace GB19_outcomeW17 = 1 if districtW17 == 10689
replace GB19_outcomeW17 = 2 if districtW17 == 10690
replace GB19_outcomeW17 = 2 if districtW17 == 10691
replace GB19_outcomeW17 = 2 if districtW17 == 10692
replace GB19_outcomeW17 = 1 if districtW17 == 10693
replace GB19_outcomeW17 = 1 if districtW17 == 10694
replace GB19_outcomeW17 = 1 if districtW17 == 10695
replace GB19_outcomeW17 = 2 if districtW17 == 10696
replace GB19_outcomeW17 = 1 if districtW17 == 10697
replace GB19_outcomeW17 = 2 if districtW17 == 10698
replace GB19_outcomeW17 = 4 if districtW17 == 20028
replace GB19_outcomeW17 = 1 if districtW17 == 10699
replace GB19_outcomeW17 = 1 if districtW17 == 10700
replace GB19_outcomeW17 = 2 if districtW17 == 10701
replace GB19_outcomeW17 = -9999 if districtW17 == 40007
replace GB19_outcomeW17 = 1 if districtW17 == 10702
replace GB19_outcomeW17 = 1 if districtW17 == 10703
replace GB19_outcomeW17 = 1 if districtW17 == 10704
replace GB19_outcomeW17 = 1 if districtW17 == 10705
replace GB19_outcomeW17 = -9999 if districtW17 == 40008
replace GB19_outcomeW17 = 1 if districtW17 == 10706
replace GB19_outcomeW17 = 1 if districtW17 == 10707
replace GB19_outcomeW17 = 2 if districtW17 == 10708
replace GB19_outcomeW17 = 2 if districtW17 == 10709
replace GB19_outcomeW17 = 1 if districtW17 == 10710
replace GB19_outcomeW17 = 1 if districtW17 == 10711
replace GB19_outcomeW17 = 4 if districtW17 == 20029
replace GB19_outcomeW17 = 4 if districtW17 == 20030
replace GB19_outcomeW17 = 4 if districtW17 == 20031
replace GB19_outcomeW17 = 4 if districtW17 == 20032
replace GB19_outcomeW17 = 4 if districtW17 == 20033
replace GB19_outcomeW17 = 4 if districtW17 == 20034
replace GB19_outcomeW17 = 4 if districtW17 == 20035
replace GB19_outcomeW17 = 4 if districtW17 == 20036
replace GB19_outcomeW17 = 1 if districtW17 == 10712
replace GB19_outcomeW17 = 4 if districtW17 == 20037
replace GB19_outcomeW17 = 1 if districtW17 == 10713
replace GB19_outcomeW17 = 2 if districtW17 == 30046
replace GB19_outcomeW17 = 1 if districtW17 == 10714
replace GB19_outcomeW17 = 1 if districtW17 == 10715
replace GB19_outcomeW17 = 1 if districtW17 == 10716
replace GB19_outcomeW17 = 1 if districtW17 == 10717
replace GB19_outcomeW17 = 2 if districtW17 == 10718
replace GB19_outcomeW17 = 1 if districtW17 == 10719
replace GB19_outcomeW17 = 2 if districtW17 == 10720
replace GB19_outcomeW17 = 2 if districtW17 == 10721
replace GB19_outcomeW17 = 1 if districtW17 == 10722
replace GB19_outcomeW17 = 2 if districtW17 == 10723
replace GB19_outcomeW17 = 1 if districtW17 == 10724
replace GB19_outcomeW17 = 2 if districtW17 == 10725
replace GB19_outcomeW17 = 2 if districtW17 == 10726
replace GB19_outcomeW17 = 2 if districtW17 == 10727
replace GB19_outcomeW17 = 1 if districtW17 == 10728
replace GB19_outcomeW17 = 1 if districtW17 == 10729
replace GB19_outcomeW17 = 1 if districtW17 == 10730
replace GB19_outcomeW17 = 1 if districtW17 == 10731
replace GB19_outcomeW17 = 2 if districtW17 == 10732
replace GB19_outcomeW17 = 2 if districtW17 == 10733
replace GB19_outcomeW17 = 1 if districtW17 == 10734
replace GB19_outcomeW17 = 1 if districtW17 == 10735
replace GB19_outcomeW17 = 1 if districtW17 == 10736
replace GB19_outcomeW17 = 2 if districtW17 == 10737
replace GB19_outcomeW17 = 1 if districtW17 == 10738
replace GB19_outcomeW17 = 1 if districtW17 == 10739
replace GB19_outcomeW17 = 2 if districtW17 == 10740
replace GB19_outcomeW17 = 1 if districtW17 == 10741
replace GB19_outcomeW17 = 1 if districtW17 == 10742
replace GB19_outcomeW17 = 1 if districtW17 == 10743
replace GB19_outcomeW17 = 1 if districtW17 == 10744
replace GB19_outcomeW17 = 1 if districtW17 == 10745
replace GB19_outcomeW17 = 1 if districtW17 == 10746
replace GB19_outcomeW17 = 1 if districtW17 == 10747
replace GB19_outcomeW17 = 1 if districtW17 == 10748
replace GB19_outcomeW17 = 1 if districtW17 == 10749
replace GB19_outcomeW17 = 2 if districtW17 == 10750
replace GB19_outcomeW17 = 1 if districtW17 == 10751
replace GB19_outcomeW17 = 2 if districtW17 == 10752
replace GB19_outcomeW17 = 1 if districtW17 == 10753
replace GB19_outcomeW17 = 2 if districtW17 == 10754
replace GB19_outcomeW17 = 2 if districtW17 == 10755
replace GB19_outcomeW17 = 2 if districtW17 == 10756
replace GB19_outcomeW17 = 1 if districtW17 == 10757
replace GB19_outcomeW17 = 1 if districtW17 == 10758
replace GB19_outcomeW17 = 2 if districtW17 == 10759
replace GB19_outcomeW17 = 2 if districtW17 == 10760
replace GB19_outcomeW17 = 4 if districtW17 == 20038
replace GB19_outcomeW17 = 4 if districtW17 == 20039
replace GB19_outcomeW17 = 1 if districtW17 == 10761
replace GB19_outcomeW17 = 1 if districtW17 == 10762
replace GB19_outcomeW17 = 2 if districtW17 == 10763
replace GB19_outcomeW17 = 2 if districtW17 == 10764
replace GB19_outcomeW17 = 2 if districtW17 == 30077
replace GB19_outcomeW17 = 2 if districtW17 == 10765
replace GB19_outcomeW17 = 1 if districtW17 == 10766
replace GB19_outcomeW17 = 1 if districtW17 == 10767
replace GB19_outcomeW17 = 1 if districtW17 == 10768
replace GB19_outcomeW17 = 1 if districtW17 == 10769
replace GB19_outcomeW17 = 4 if districtW17 == 20040
replace GB19_outcomeW17 = 3 if districtW17 == 10770
replace GB19_outcomeW17 = 2 if districtW17 == 10771
replace GB19_outcomeW17 = 2 if districtW17 == 10772
replace GB19_outcomeW17 = 2 if districtW17 == 10773
replace GB19_outcomeW17 = 1 if districtW17 == 10774
replace GB19_outcomeW17 = 4 if districtW17 == 20041
replace GB19_outcomeW17 = 2 if districtW17 == 10775
replace GB19_outcomeW17 = -9999 if districtW17 == 40009
replace GB19_outcomeW17 = 4 if districtW17 == 20042
replace GB19_outcomeW17 = 2 if districtW17 == 10776
replace GB19_outcomeW17 = 2 if districtW17 == 10777
replace GB19_outcomeW17 = 2 if districtW17 == 10778
replace GB19_outcomeW17 = 2 if districtW17 == 10779
replace GB19_outcomeW17 = 2 if districtW17 == 10780
replace GB19_outcomeW17 = 2 if districtW17 == 10781
replace GB19_outcomeW17 = 2 if districtW17 == 10782
replace GB19_outcomeW17 = 2 if districtW17 == 10783
replace GB19_outcomeW17 = 2 if districtW17 == 10784
replace GB19_outcomeW17 = 1 if districtW17 == 10785
replace GB19_outcomeW17 = 1 if districtW17 == 10786
replace GB19_outcomeW17 = 2 if districtW17 == 10789
replace GB19_outcomeW17 = 2 if districtW17 == 10787
replace GB19_outcomeW17 = 2 if districtW17 == 10788
replace GB19_outcomeW17 = 2 if districtW17 == 10790
replace GB19_outcomeW17 = 1 if districtW17 == 10791
replace GB19_outcomeW17 = 1 if districtW17 == 10792
replace GB19_outcomeW17 = 4 if districtW17 == 20043
replace GB19_outcomeW17 = 2 if districtW17 == 10793
replace GB19_outcomeW17 = 2 if districtW17 == 10794
replace GB19_outcomeW17 = 2 if districtW17 == 10795
replace GB19_outcomeW17 = 2 if districtW17 == 10796
replace GB19_outcomeW17 = 4 if districtW17 == 20044
replace GB19_outcomeW17 = 2 if districtW17 == 30045
replace GB19_outcomeW17 = 1 if districtW17 == 10797
replace GB19_outcomeW17 = 1 if districtW17 == 10798
replace GB19_outcomeW17 = 1 if districtW17 == 10799
replace GB19_outcomeW17 = 2 if districtW17 == 10800
replace GB19_outcomeW17 = 2 if districtW17 == 10801
replace GB19_outcomeW17 = 1 if districtW17 == 10802
replace GB19_outcomeW17 = 1 if districtW17 == 10803
replace GB19_outcomeW17 = 1 if districtW17 == 10804
replace GB19_outcomeW17 = 2 if districtW17 == 10805
replace GB19_outcomeW17 = 1 if districtW17 == 10806
replace GB19_outcomeW17 = 2 if districtW17 == 10807
replace GB19_outcomeW17 = 2 if districtW17 == 10808
replace GB19_outcomeW17 = 2 if districtW17 == 10809
replace GB19_outcomeW17 = 1 if districtW17 == 10810
replace GB19_outcomeW17 = 1 if districtW17 == 10811
replace GB19_outcomeW17 = 1 if districtW17 == 10812
replace GB19_outcomeW17 = 2 if districtW17 == 30071
replace GB19_outcomeW17 = 1 if districtW17 == 10813
replace GB19_outcomeW17 = 1 if districtW17 == 10814
replace GB19_outcomeW17 = 2 if districtW17 == 10819
replace GB19_outcomeW17 = 1 if districtW17 == 10820
replace GB19_outcomeW17 = 1 if districtW17 == 10815
replace GB19_outcomeW17 = 4 if districtW17 == 20045
replace GB19_outcomeW17 = 1 if districtW17 == 10816
replace GB19_outcomeW17 = 1 if districtW17 == 10817
replace GB19_outcomeW17 = -9999 if districtW17 == 40010
replace GB19_outcomeW17 = 1 if districtW17 == 10818
replace GB19_outcomeW17 = 1 if districtW17 == 10821
replace GB19_outcomeW17 = 1 if districtW17 == 10822
replace GB19_outcomeW17 = 2 if districtW17 == 10823
replace GB19_outcomeW17 = 1 if districtW17 == 10824
replace GB19_outcomeW17 = 1 if districtW17 == 30054
replace GB19_outcomeW17 = 1 if districtW17 == 30063
replace GB19_outcomeW17 = 1 if districtW17 == 20046
replace GB19_outcomeW17 = 1 if districtW17 == 10825
replace GB19_outcomeW17 = 1 if districtW17 == 10826
replace GB19_outcomeW17 = 4 if districtW17 == 20047
replace GB19_outcomeW17 = 4 if districtW17 == 20027
replace GB19_outcomeW17 = 2 if districtW17 == 30069
replace GB19_outcomeW17 = 1 if districtW17 == 10829
replace GB19_outcomeW17 = 1 if districtW17 == 10830
replace GB19_outcomeW17 = 1 if districtW17 == 10834
replace GB19_outcomeW17 = 2 if districtW17 == 10831
replace GB19_outcomeW17 = 2 if districtW17 == 10832
replace GB19_outcomeW17 = 2 if districtW17 == 10833
replace GB19_outcomeW17 = 1 if districtW17 == 10827
replace GB19_outcomeW17 = 1 if districtW17 == 10828
replace GB19_outcomeW17 = 2 if districtW17 == 30055
replace GB19_outcomeW17 = 2 if districtW17 == 30056
replace GB19_outcomeW17 = -9999 if districtW17 == 40011
replace GB19_outcomeW17 = 1 if districtW17 == 10835
replace GB19_outcomeW17 = 2 if districtW17 == 10836
replace GB19_outcomeW17 = 1 if districtW17 == 10861
replace GB19_outcomeW17 = 1 if districtW17 == 10862
replace GB19_outcomeW17 = -9999 if districtW17 == 40012
replace GB19_outcomeW17 = 4 if districtW17 == 20048
replace GB19_outcomeW17 = 1 if districtW17 == 10837
replace GB19_outcomeW17 = 1 if districtW17 == 10838
replace GB19_outcomeW17 = 1 if districtW17 == 10839
replace GB19_outcomeW17 = -9999 if districtW17 == 40013
replace GB19_outcomeW17 = 2 if districtW17 == 10840
replace GB19_outcomeW17 = 1 if districtW17 == 10841
replace GB19_outcomeW17 = 1 if districtW17 == 10842
replace GB19_outcomeW17 = 1 if districtW17 == 10843
replace GB19_outcomeW17 = 3 if districtW17 == 20049
replace GB19_outcomeW17 = 1 if districtW17 == 10844
replace GB19_outcomeW17 = 1 if districtW17 == 10845
replace GB19_outcomeW17 = 1 if districtW17 == 10846
replace GB19_outcomeW17 = 1 if districtW17 == 10847
replace GB19_outcomeW17 = 1 if districtW17 == 10848
replace GB19_outcomeW17 = 1 if districtW17 == 10849
replace GB19_outcomeW17 = 1 if districtW17 == 10850
replace GB19_outcomeW17 = 1 if districtW17 == 10851
replace GB19_outcomeW17 = 1 if districtW17 == 10852
replace GB19_outcomeW17 = 2 if districtW17 == 10853
replace GB19_outcomeW17 = 1 if districtW17 == 10854
replace GB19_outcomeW17 = 1 if districtW17 == 10855
replace GB19_outcomeW17 = 1 if districtW17 == 10856
replace GB19_outcomeW17 = 1 if districtW17 == 10857
replace GB19_outcomeW17 = 1 if districtW17 == 10858
replace GB19_outcomeW17 = 1 if districtW17 == 10859
replace GB19_outcomeW17 = 1 if districtW17 == 10860
replace GB19_outcomeW17 = 1 if districtW17 == 10863
replace GB19_outcomeW17 = 2 if districtW17 == 10864
replace GB19_outcomeW17 = 2 if districtW17 == 10865
replace GB19_outcomeW17 = 2 if districtW17 == 10866
replace GB19_outcomeW17 = 2 if districtW17 == 10867
replace GB19_outcomeW17 = 1 if districtW17 == 10868
replace GB19_outcomeW17 = 4 if districtW17 == 20050
replace GB19_outcomeW17 = 2 if districtW17 == 30074
replace GB19_outcomeW17 = 1 if districtW17 == 10869
replace GB19_outcomeW17 = 2 if districtW17 == 10870
replace GB19_outcomeW17 = 2 if districtW17 == 10871
replace GB19_outcomeW17 = 3 if districtW17 == 20051
replace GB19_outcomeW17 = 1 if districtW17 == 10872
replace GB19_outcomeW17 = 2 if districtW17 == 10873
replace GB19_outcomeW17 = 3 if districtW17 == 10874
replace GB19_outcomeW17 = 4 if districtW17 == 20052
replace GB19_outcomeW17 = 4 if districtW17 == 20053
replace GB19_outcomeW17 = 1 if districtW17 == 10875
replace GB19_outcomeW17 = 1 if districtW17 == 10876
replace GB19_outcomeW17 = 1 if districtW17 == 10877
replace GB19_outcomeW17 = 4 if districtW17 == 20054
replace GB19_outcomeW17 = 1 if districtW17 == 10878
replace GB19_outcomeW17 = 1 if districtW17 == 10879
replace GB19_outcomeW17 = 2 if districtW17 == 10880
replace GB19_outcomeW17 = 2 if districtW17 == 30075
replace GB19_outcomeW17 = 1 if districtW17 == 10881
replace GB19_outcomeW17 = 2 if districtW17 == 10882
replace GB19_outcomeW17 = 1 if districtW17 == 10883
replace GB19_outcomeW17 = 2 if districtW17 == 10884
replace GB19_outcomeW17 = 1 if districtW17 == 30065
replace GB19_outcomeW17 = 2 if districtW17 == 10885
replace GB19_outcomeW17 = 1 if districtW17 == 10886
replace GB19_outcomeW17 = 2 if districtW17 == 10887
replace GB19_outcomeW17 = 1 if districtW17 == 10888
replace GB19_outcomeW17 = 2 if districtW17 == 10889
replace GB19_outcomeW17 = 1 if districtW17 == 10890
replace GB19_outcomeW17 = 1 if districtW17 == 10891
replace GB19_outcomeW17 = 1 if districtW17 == 10892
replace GB19_outcomeW17 = 1 if districtW17 == 10893
replace GB19_outcomeW17 = 2 if districtW17 == 30052
replace GB19_outcomeW17 = 1 if districtW17 == 10894
replace GB19_outcomeW17 = 3 if districtW17 == 10896
replace GB19_outcomeW17 = 1 if districtW17 == 10895
replace GB19_outcomeW17 = 2 if districtW17 == 10897
replace GB19_outcomeW17 = 1 if districtW17 == 10898
replace GB19_outcomeW17 = 1 if districtW17 == 10899
replace GB19_outcomeW17 = 1 if districtW17 == 10900
replace GB19_outcomeW17 = 1 if districtW17 == 10901
replace GB19_outcomeW17 = 1 if districtW17 == 10902
replace GB19_outcomeW17 = 4 if districtW17 == 20055
replace GB19_outcomeW17 = 2 if districtW17 == 10904
replace GB19_outcomeW17 = 1 if districtW17 == 10903
replace GB19_outcomeW17 = 1 if districtW17 == 10905
replace GB19_outcomeW17 = 1 if districtW17 == 10906
replace GB19_outcomeW17 = 1 if districtW17 == 10907
replace GB19_outcomeW17 = 1 if districtW17 == 10908
replace GB19_outcomeW17 = 4 if districtW17 == 20056
replace GB19_outcomeW17 = 1 if districtW17 == 10909
replace GB19_outcomeW17 = 1 if districtW17 == 10910
replace GB19_outcomeW17 = 2 if districtW17 == 10911
replace GB19_outcomeW17 = 1 if districtW17 == 10912
replace GB19_outcomeW17 = 1 if districtW17 == 10913
replace GB19_outcomeW17 = 1 if districtW17 == 10914
replace GB19_outcomeW17 = 1 if districtW17 == 10915
replace GB19_outcomeW17 = 2 if districtW17 == 10916
replace GB19_outcomeW17 = 1 if districtW17 == 10917
replace GB19_outcomeW17 = 1 if districtW17 == 10918
replace GB19_outcomeW17 = 2 if districtW17 == 10921
replace GB19_outcomeW17 = 2 if districtW17 == 10919
replace GB19_outcomeW17 = 2 if districtW17 == 10922
replace GB19_outcomeW17 = 2 if districtW17 == 10923
replace GB19_outcomeW17 = 2 if districtW17 == 10920
replace GB19_outcomeW17 = 1 if districtW17 == 10924
replace GB19_outcomeW17 = 1 if districtW17 == 10925
replace GB19_outcomeW17 = 1 if districtW17 == 10926
replace GB19_outcomeW17 = 1 if districtW17 == 10927
replace GB19_outcomeW17 = 1 if districtW17 == 10928
replace GB19_outcomeW17 = 1 if districtW17 == 10929
replace GB19_outcomeW17 = 2 if districtW17 == 10930
replace GB19_outcomeW17 = 1 if districtW17 == 10931
replace GB19_outcomeW17 = 1 if districtW17 == 10932
replace GB19_outcomeW17 = 1 if districtW17 == 10955
replace GB19_outcomeW17 = 2 if districtW17 == 10956
replace GB19_outcomeW17 = -9999 if districtW17 == 40014
replace GB19_outcomeW17 = 1 if districtW17 == 10933
replace GB19_outcomeW17 = 1 if districtW17 == 10934
replace GB19_outcomeW17 = 1 if districtW17 == 10935
replace GB19_outcomeW17 = 1 if districtW17 == 10936
replace GB19_outcomeW17 = -9999 if districtW17 == 40015
replace GB19_outcomeW17 = 1 if districtW17 == 10937
replace GB19_outcomeW17 = 1 if districtW17 == 10938
replace GB19_outcomeW17 = 1 if districtW17 == 10957
replace GB19_outcomeW17 = 1 if districtW17 == 10939
replace GB19_outcomeW17 = 1 if districtW17 == 10940
replace GB19_outcomeW17 = 1 if districtW17 == 10941
replace GB19_outcomeW17 = 1 if districtW17 == 10942
replace GB19_outcomeW17 = 1 if districtW17 == 10958
replace GB19_outcomeW17 = 1 if districtW17 == 10943
replace GB19_outcomeW17 = 2 if districtW17 == 10944
replace GB19_outcomeW17 = 1 if districtW17 == 10945
replace GB19_outcomeW17 = 1 if districtW17 == 10946
replace GB19_outcomeW17 = 1 if districtW17 == 10947
replace GB19_outcomeW17 = 1 if districtW17 == 10948
replace GB19_outcomeW17 = 1 if districtW17 == 10949
replace GB19_outcomeW17 = 1 if districtW17 == 10950
replace GB19_outcomeW17 = 1 if districtW17 == 10951
replace GB19_outcomeW17 = 1 if districtW17 == 10952
replace GB19_outcomeW17 = 1 if districtW17 == 10953
replace GB19_outcomeW17 = 1 if districtW17 == 10954
replace GB19_outcomeW17 = 1 if districtW17 == 10959
replace GB19_outcomeW17 = 1 if districtW17 == 10965
replace GB19_outcomeW17 = 1 if districtW17 == 10966
replace GB19_outcomeW17 = 3 if districtW17 == 10960
replace GB19_outcomeW17 = 2 if districtW17 == 10967
replace GB19_outcomeW17 = 1 if districtW17 == 10961
replace GB19_outcomeW17 = 1 if districtW17 == 10968
replace GB19_outcomeW17 = 2 if districtW17 == 10962
replace GB19_outcomeW17 = 2 if districtW17 == 10963
replace GB19_outcomeW17 = 4 if districtW17 == 20057
replace GB19_outcomeW17 = 1 if districtW17 == 10964
replace GB19_outcomeW17 = 2 if districtW17 == 10969
replace GB19_outcomeW17 = 2 if districtW17 == 10970
replace GB19_outcomeW17 = 1 if districtW17 == 10971
replace GB19_outcomeW17 = 1 if districtW17 == 10972
replace GB19_outcomeW17 = 1 if districtW17 == 10973
replace GB19_outcomeW17 = 1 if districtW17 == 10974
replace GB19_outcomeW17 = 1 if districtW17 == 10975
replace GB19_outcomeW17 = 1 if districtW17 == 10976
replace GB19_outcomeW17 = -9999 if districtW17 == 40016
replace GB19_outcomeW17 = 1 if districtW17 == 10977
replace GB19_outcomeW17 = 2 if districtW17 == 10978
replace GB19_outcomeW17 = 2 if districtW17 == 10979
replace GB19_outcomeW17 = 1 if districtW17 == 10980
replace GB19_outcomeW17 = 1 if districtW17 == 10981
replace GB19_outcomeW17 = 2 if districtW17 == 10982
replace GB19_outcomeW17 = 1 if districtW17 == 10983
replace GB19_outcomeW17 = 1 if districtW17 == 10984
replace GB19_outcomeW17 = 1 if districtW17 == 10985
replace GB19_outcomeW17 = 2 if districtW17 == 30048
replace GB19_outcomeW17 = 2 if districtW17 == 30047
replace GB19_outcomeW17 = 1 if districtW17 == 10986
replace GB19_outcomeW17 = 1 if districtW17 == 10987
replace GB19_outcomeW17 = 1 if districtW17 == 10988
replace GB19_outcomeW17 = 1 if districtW17 == 10989
replace GB19_outcomeW17 = 1 if districtW17 == 10990
replace GB19_outcomeW17 = 1 if districtW17 == 10991
replace GB19_outcomeW17 = 1 if districtW17 == 10992
replace GB19_outcomeW17 = 1 if districtW17 == 10993
replace GB19_outcomeW17 = 1 if districtW17 == 10994
replace GB19_outcomeW17 = 1 if districtW17 == 10995
replace GB19_outcomeW17 = 1 if districtW17 == 10996
replace GB19_outcomeW17 = 1 if districtW17 == 10997
replace GB19_outcomeW17 = 2 if districtW17 == 10998
replace GB19_outcomeW17 = 1 if districtW17 == 10999
replace GB19_outcomeW17 = 2 if districtW17 == 30053
replace GB19_outcomeW17 = 1 if districtW17 == 11000
replace GB19_outcomeW17 = 1 if districtW17 == 11001
replace GB19_outcomeW17 = 2 if districtW17 == 11002
replace GB19_outcomeW17 = 1 if districtW17 == 11003
replace GB19_outcomeW17 = 1 if districtW17 == 11004
replace GB19_outcomeW17 = 3 if districtW17 == 11005
replace GB19_outcomeW17 = 2 if districtW17 == 11006
replace GB19_outcomeW17 = -9999 if districtW17 == 40017
replace GB19_outcomeW17 = 1 if districtW17 == 11007
replace GB19_outcomeW17 = 1 if districtW17 == 30060
replace GB19_outcomeW17 = 1 if districtW17 == 30078
replace GB19_outcomeW17 = 2 if districtW17 == 11008
replace GB19_outcomeW17 = 1 if districtW17 == 11009
replace GB19_outcomeW17 = 2 if districtW17 == 11010
replace GB19_outcomeW17 = 1 if districtW17 == 11011
replace GB19_outcomeW17 = 2 if districtW17 == 11012
replace GB19_outcomeW17 = 2 if districtW17 == 11013
replace GB19_outcomeW17 = 2 if districtW17 == 11014
replace GB19_outcomeW17 = 1 if districtW17 == 11015
replace GB19_outcomeW17 = 2 if districtW17 == 11016
replace GB19_outcomeW17 = 2 if districtW17 == 11017
replace GB19_outcomeW17 = 1 if districtW17 == 11018
replace GB19_outcomeW17 = 2 if districtW17 == 11019
replace GB19_outcomeW17 = 2 if districtW17 == 11020
replace GB19_outcomeW17 = 1 if districtW17 == 11021
replace GB19_outcomeW17 = 1 if districtW17 == 11022
replace GB19_outcomeW17 = 1 if districtW17 == 11023
replace GB19_outcomeW17 = 2 if districtW17 == 11024
replace GB19_outcomeW17 = 1 if districtW17 == 11025
replace GB19_outcomeW17 = 1 if districtW17 == 11026
replace GB19_outcomeW17 = 1 if districtW17 == 11027
replace GB19_outcomeW17 = 2 if districtW17 == 11028
replace GB19_outcomeW17 = 1 if districtW17 == 20058
replace GB19_outcomeW17 = 1 if districtW17 == 11029
replace GB19_outcomeW17 = 1 if districtW17 == 11030
replace GB19_outcomeW17 = 1 if districtW17 == 11031
replace GB19_outcomeW17 = 4 if districtW17 == 20059
replace GB19_outcomeW17 = 2 if districtW17 == 11032
replace GB19_outcomeW17 = 2 if districtW17 == 11033
replace GB19_outcomeW17 = 2 if districtW17 == 11036
replace GB19_outcomeW17 = 3 if districtW17 == 11037
replace GB19_outcomeW17 = 1 if districtW17 == 11038
replace GB19_outcomeW17 = 1 if districtW17 == 11034
replace GB19_outcomeW17 = -9999 if districtW17 == 40018
replace GB19_outcomeW17 = 1 if districtW17 == 11035
replace GB19_outcomeW17 = 2 if districtW17 == 11039
replace GB19_outcomeW17 = 1 if districtW17 == 11040
replace GB19_outcomeW17 = 1 if districtW17 == 11041
replace GB19_outcomeW17 = 1 if districtW17 == 11042
replace GB19_outcomeW17 = 2 if districtW17 == 11043
replace GB19_outcomeW17 = 2 if districtW17 == 11044
replace GB19_outcomeW17 = 1 if districtW17 == 11045
replace GB19_outcomeW17 = 1 if districtW17 == 11046
replace GB19_outcomeW17 = 1 if districtW17 == 11047
replace GB19_outcomeW17 = 1 if districtW17 == 11048
replace GB19_outcomeW17 = 1 if districtW17 == 11049
replace GB19_outcomeW17 = 2 if districtW17 == 11050
replace GB19_outcomeW17 = 1 if districtW17 == 11051
replace GB19_outcomeW17 = 1 if districtW17 == 11052
replace GB19_outcomeW17 = 1 if districtW17 == 11053
replace GB19_outcomeW17 = 2 if districtW17 == 11054
replace GB19_outcomeW17 = 1 if districtW17 == 11055
replace GB19_outcomeW17 = 1 if districtW17 == 30044
replace GB19_outcomeW17 = 1 if districtW17 == 11056
replace GB19_outcomeW17 = 1 if districtW17 == 11057
replace GB19_outcomeW17 = 1 if districtW17 == 11058
replace GB19_outcomeW17 = 2 if districtW17 == 11059
replace GB19_outcomeW17 = 1 if districtW17 == 11060
replace GB19_outcomeW17 = 1 if districtW17 == 30041
replace GB19_outcomeW17 = 2 if districtW17 == 11061
replace GB19_outcomeW17 = 1 if districtW17 == 11062

gen GB19_outcomeW18 = .

replace GB19_outcomeW18 = 2 if districtW18 == 30049 
replace GB19_outcomeW18 = 1 if districtW18 == 30058 
replace GB19_outcomeW18 = 4 if districtW18 == 20001 
replace GB19_outcomeW18 = 4 if districtW18 == 20002 
replace GB19_outcomeW18 = 4 if districtW18 == 20003 
replace GB19_outcomeW18 = 1 if districtW18 == 10530 
replace GB19_outcomeW18 = 1 if districtW18 == 10531 
replace GB19_outcomeW18 = 1 if districtW18 == 10532 
replace GB19_outcomeW18 = 2 if districtW18 == 30043 
replace GB19_outcomeW18 = 1 if districtW18 == 10533 
replace GB19_outcomeW18 = 4 if districtW18 == 20004 
replace GB19_outcomeW18 = 5 if districtW18 == 30057 
replace GB19_outcomeW18 = 4 if districtW18 == 20005 
replace GB19_outcomeW18 = 1 if districtW18 == 10534 
replace GB19_outcomeW18 = 1 if districtW18 == 10535 
replace GB19_outcomeW18 = 1 if districtW18 == 10536 
replace GB19_outcomeW18 = 2 if districtW18 == 10537 
replace GB19_outcomeW18 = 1 if districtW18 == 10538 
replace GB19_outcomeW18 = 4 if districtW18 == 20006 
replace GB19_outcomeW18 = 1 if districtW18 == 10539 
replace GB19_outcomeW18 = 1 if districtW18 == 20007 
replace GB19_outcomeW18 = 2 if districtW18 == 10540 
replace GB19_outcomeW18 = 2 if districtW18 == 10541 
replace GB19_outcomeW18 = 2 if districtW18 == 10542 
replace GB19_outcomeW18 = 1 if districtW18 == 10543 
replace GB19_outcomeW18 = 1 if districtW18 == 10544 
replace GB19_outcomeW18 = 1 if districtW18 == 10545 
replace GB19_outcomeW18 = 1 if districtW18 == 10546 
replace GB19_outcomeW18 = 3 if districtW18 == 10547 
replace GB19_outcomeW18 = 2 if districtW18 == 10548 
replace GB19_outcomeW18 = 2 if districtW18 == 10549 
replace GB19_outcomeW18 = 1 if districtW18 == 10550 
replace GB19_outcomeW18 = 1 if districtW18 == 10551 
replace GB19_outcomeW18 = 2 if districtW18 == 10552 
replace GB19_outcomeW18 = -9999 if districtW18 == 40001 
replace GB19_outcomeW18 = -9999 if districtW18 == 40002 
replace GB19_outcomeW18 = -9999 if districtW18 == 40003 
replace GB19_outcomeW18 = -9999 if districtW18 == 40004 
replace GB19_outcomeW18 = 2 if districtW18 == 10553 
replace GB19_outcomeW18 = 1 if districtW18 == 20008 
replace GB19_outcomeW18 = 1 if districtW18 == 10554 
replace GB19_outcomeW18 = 2 if districtW18 == 10555 
replace GB19_outcomeW18 = 1 if districtW18 == 10556 
replace GB19_outcomeW18 = 1 if districtW18 == 10557 
replace GB19_outcomeW18 = 1 if districtW18 == 10558 
replace GB19_outcomeW18 = 2 if districtW18 == 10559 
replace GB19_outcomeW18 = 2 if districtW18 == 10560 
replace GB19_outcomeW18 = 2 if districtW18 == 10561 
replace GB19_outcomeW18 = 2 if districtW18 == 10562 
replace GB19_outcomeW18 = 2 if districtW18 == 10563 
replace GB19_outcomeW18 = 2 if districtW18 == 10564 
replace GB19_outcomeW18 = 1 if districtW18 == 10565 
replace GB19_outcomeW18 = 2 if districtW18 == 10566 
replace GB19_outcomeW18 = 2 if districtW18 == 10567 
replace GB19_outcomeW18 = 2 if districtW18 == 10568 
replace GB19_outcomeW18 = 1 if districtW18 == 10569 
replace GB19_outcomeW18 = 2 if districtW18 == 10570 
replace GB19_outcomeW18 = 2 if districtW18 == 10571 
replace GB19_outcomeW18 = 1 if districtW18 == 10572 
replace GB19_outcomeW18 = 1 if districtW18 == 10573 
replace GB19_outcomeW18 = 2 if districtW18 == 30072 
replace GB19_outcomeW18 = 2 if districtW18 == 10574 
replace GB19_outcomeW18 = 1 if districtW18 == 10575 
replace GB19_outcomeW18 = 1 if districtW18 == 10576 
replace GB19_outcomeW18 = 1 if districtW18 == 10577 
replace GB19_outcomeW18 = 1 if districtW18 == 10578 
replace GB19_outcomeW18 = 2 if districtW18 == 10579 
replace GB19_outcomeW18 = 1 if districtW18 == 10580 
replace GB19_outcomeW18 = 2 if districtW18 == 10581 
replace GB19_outcomeW18 = 1 if districtW18 == 10582 
replace GB19_outcomeW18 = 1 if districtW18 == 10583 
replace GB19_outcomeW18 = 1 if districtW18 == 10584 
replace GB19_outcomeW18 = 1 if districtW18 == 10585 
replace GB19_outcomeW18 = 1 if districtW18 == 10586 
replace GB19_outcomeW18 = 2 if districtW18 == 10587 
replace GB19_outcomeW18 = 2 if districtW18 == 10588 
replace GB19_outcomeW18 = 2 if districtW18 == 10589 
replace GB19_outcomeW18 = 1 if districtW18 == 10590 
replace GB19_outcomeW18 = 1 if districtW18 == 30068 
replace GB19_outcomeW18 = 2 if districtW18 == 10591 
replace GB19_outcomeW18 = 2 if districtW18 == 10593 
replace GB19_outcomeW18 = 2 if districtW18 == 10592 
replace GB19_outcomeW18 = 1 if districtW18 == 10594 
replace GB19_outcomeW18 = 1 if districtW18 == 30073 
replace GB19_outcomeW18 = 1 if districtW18 == 10595 
replace GB19_outcomeW18 = 1 if districtW18 == 10596 
replace GB19_outcomeW18 = 2 if districtW18 == 10597 
replace GB19_outcomeW18 = 7 if districtW18 == 10598 
replace GB19_outcomeW18 = 2 if districtW18 == 10599 
replace GB19_outcomeW18 = 2 if districtW18 == 10600 
replace GB19_outcomeW18 = 2 if districtW18 == 10601 
replace GB19_outcomeW18 = 2 if districtW18 == 10602 
replace GB19_outcomeW18 = 1 if districtW18 == 10603 
replace GB19_outcomeW18 = 1 if districtW18 == 10604 
replace GB19_outcomeW18 = 1 if districtW18 == 10605 
replace GB19_outcomeW18 = 1 if districtW18 == 10606 
replace GB19_outcomeW18 = 1 if districtW18 == 10607 
replace GB19_outcomeW18 = 1 if districtW18 == 10608 
replace GB19_outcomeW18 = 1 if districtW18 == 10609 
replace GB19_outcomeW18 = 1 if districtW18 == 10610 
replace GB19_outcomeW18 = 1 if districtW18 == 10611 
replace GB19_outcomeW18 = 1 if districtW18 == 10612 
replace GB19_outcomeW18 = 1 if districtW18 == 10613 
replace GB19_outcomeW18 = 2 if districtW18 == 30076 
replace GB19_outcomeW18 = 3 if districtW18 == 20009 
replace GB19_outcomeW18 = 1 if districtW18 == 10614 
replace GB19_outcomeW18 = 2 if districtW18 == 10615 
replace GB19_outcomeW18 = 1 if districtW18 == 10616 
replace GB19_outcomeW18 = 2 if districtW18 == 10617 
replace GB19_outcomeW18 = 1 if districtW18 == 10618 
replace GB19_outcomeW18 = 2 if districtW18 == 10619 
replace GB19_outcomeW18 = 2 if districtW18 == 30050 
replace GB19_outcomeW18 = 2 if districtW18 == 30051 
replace GB19_outcomeW18 = 2 if districtW18 == 30080 
replace GB19_outcomeW18 = 2 if districtW18 == 30079 
replace GB19_outcomeW18 = 1 if districtW18 == 10620 
replace GB19_outcomeW18 = 5 if districtW18 == 30067 
replace GB19_outcomeW18 = 1 if districtW18 == 30066 
replace GB19_outcomeW18 = 1 if districtW18 == 10621 
replace GB19_outcomeW18 = 1 if districtW18 == 10622 
replace GB19_outcomeW18 = 4 if districtW18 == 20010 
replace GB19_outcomeW18 = 1 if districtW18 == 10623 
replace GB19_outcomeW18 = 1 if districtW18 == 10624 
replace GB19_outcomeW18 = 5 if districtW18 == 30064 
replace GB19_outcomeW18 = 1 if districtW18 == 10625 
replace GB19_outcomeW18 = 1 if districtW18 == 10626 
replace GB19_outcomeW18 = 1 if districtW18 == 10627 
replace GB19_outcomeW18 = 1 if districtW18 == 10628 
replace GB19_outcomeW18 = 1 if districtW18 == 10629 
replace GB19_outcomeW18 = 1 if districtW18 == 10630 
replace GB19_outcomeW18 = 1 if districtW18 == 10631 
replace GB19_outcomeW18 = 2 if districtW18 == 10632 
replace GB19_outcomeW18 = 1 if districtW18 == 10633 
replace GB19_outcomeW18 = 1 if districtW18 == 10634 
replace GB19_outcomeW18 = 1 if districtW18 == 10635 
replace GB19_outcomeW18 = 1 if districtW18 == 10636 
replace GB19_outcomeW18 = 2 if districtW18 == 10637 
replace GB19_outcomeW18 = 1 if districtW18 == 10638 
replace GB19_outcomeW18 = 1 if districtW18 == 10639 
replace GB19_outcomeW18 = 2 if districtW18 == 10640 
replace GB19_outcomeW18 = 2 if districtW18 == 10641 
replace GB19_outcomeW18 = 1 if districtW18 == 10642 
replace GB19_outcomeW18 = 1 if districtW18 == 10643 
replace GB19_outcomeW18 = 1 if districtW18 == 30062 
replace GB19_outcomeW18 = 1 if districtW18 == 30059 
replace GB19_outcomeW18 = 4 if districtW18 == 20011 
replace GB19_outcomeW18 = 1 if districtW18 == 10644 
replace GB19_outcomeW18 = 1 if districtW18 == 10645 
replace GB19_outcomeW18 = 1 if districtW18 == 10646 
replace GB19_outcomeW18 = 1 if districtW18 == 10647 
replace GB19_outcomeW18 = 1 if districtW18 == 10648 
replace GB19_outcomeW18 = 2 if districtW18 == 10649 
replace GB19_outcomeW18 = 2 if districtW18 == 10650 
replace GB19_outcomeW18 = 2 if districtW18 == 10651 
replace GB19_outcomeW18 = 1 if districtW18 == 10652 
replace GB19_outcomeW18 = 1 if districtW18 == 10653 
replace GB19_outcomeW18 = 2 if districtW18 == 10654 
replace GB19_outcomeW18 = 2 if districtW18 == 10655 
replace GB19_outcomeW18 = 1 if districtW18 == 10656 
replace GB19_outcomeW18 = 4 if districtW18 == 20012 
replace GB19_outcomeW18 = 2 if districtW18 == 30070 
replace GB19_outcomeW18 = 2 if districtW18 == 10657 
replace GB19_outcomeW18 = 1 if districtW18 == 10658 
replace GB19_outcomeW18 = 1 if districtW18 == 10659 
replace GB19_outcomeW18 = 1 if districtW18 == 10660 
replace GB19_outcomeW18 = 1 if districtW18 == 30042 
replace GB19_outcomeW18 = 2 if districtW18 == 10661 
replace GB19_outcomeW18 = 1 if districtW18 == 10662 
replace GB19_outcomeW18 = 1 if districtW18 == 10664 
replace GB19_outcomeW18 = 2 if districtW18 == 10663 
replace GB19_outcomeW18 = 1 if districtW18 == 10665 
replace GB19_outcomeW18 = 1 if districtW18 == 10666 
replace GB19_outcomeW18 = 2 if districtW18 == 10668 
replace GB19_outcomeW18 = 2 if districtW18 == 10669 
replace GB19_outcomeW18 = 1 if districtW18 == 10667 
replace GB19_outcomeW18 = 1 if districtW18 == 10670 
replace GB19_outcomeW18 = 1 if districtW18 == 10671 
replace GB19_outcomeW18 = 1 if districtW18 == 10672 
replace GB19_outcomeW18 = 2 if districtW18 == 10673 
replace GB19_outcomeW18 = 1 if districtW18 == 20013 
replace GB19_outcomeW18 = 1 if districtW18 == 20014 
replace GB19_outcomeW18 = 4 if districtW18 == 20015 
replace GB19_outcomeW18 = 4 if districtW18 == 20016 
replace GB19_outcomeW18 = 4 if districtW18 == 20017 
replace GB19_outcomeW18 = 5 if districtW18 == 30061 
replace GB19_outcomeW18 = 2 if districtW18 == 10674 
replace GB19_outcomeW18 = 2 if districtW18 == 10675 
replace GB19_outcomeW18 = 2 if districtW18 == 10676 
replace GB19_outcomeW18 = 2 if districtW18 == 10677 
replace GB19_outcomeW18 = -9999 if districtW18 == 40005 
replace GB19_outcomeW18 = 1 if districtW18 == 10684 
replace GB19_outcomeW18 = 1 if districtW18 == 10678 
replace GB19_outcomeW18 = 4 if districtW18 == 20018 
replace GB19_outcomeW18 = 2 if districtW18 == 10679 
replace GB19_outcomeW18 = 1 if districtW18 == 10680 
replace GB19_outcomeW18 = 4 if districtW18 == 20019 
replace GB19_outcomeW18 = 1 if districtW18 == 10685 
replace GB19_outcomeW18 = -9999 if districtW18 == 40006 
replace GB19_outcomeW18 = 4 if districtW18 == 20020 
replace GB19_outcomeW18 = 4 if districtW18 == 20021 
replace GB19_outcomeW18 = 1 if districtW18 == 10681 
replace GB19_outcomeW18 = 1 if districtW18 == 10682 
replace GB19_outcomeW18 = 1 if districtW18 == 10683 
replace GB19_outcomeW18 = 1 if districtW18 == 10686 
replace GB19_outcomeW18 = 4 if districtW18 == 20022 
replace GB19_outcomeW18 = 4 if districtW18 == 20023 
replace GB19_outcomeW18 = 2 if districtW18 == 20024 
replace GB19_outcomeW18 = 4 if districtW18 == 20025 
replace GB19_outcomeW18 = 3 if districtW18 == 20026 
replace GB19_outcomeW18 = 2 if districtW18 == 10687 
replace GB19_outcomeW18 = 2 if districtW18 == 10688 
replace GB19_outcomeW18 = 1 if districtW18 == 10689 
replace GB19_outcomeW18 = 2 if districtW18 == 10690 
replace GB19_outcomeW18 = 2 if districtW18 == 10691 
replace GB19_outcomeW18 = 2 if districtW18 == 10692 
replace GB19_outcomeW18 = 1 if districtW18 == 10693 
replace GB19_outcomeW18 = 1 if districtW18 == 10694 
replace GB19_outcomeW18 = 1 if districtW18 == 10695 
replace GB19_outcomeW18 = 2 if districtW18 == 10696 
replace GB19_outcomeW18 = 1 if districtW18 == 10697 
replace GB19_outcomeW18 = 2 if districtW18 == 10698 
replace GB19_outcomeW18 = 4 if districtW18 == 20028 
replace GB19_outcomeW18 = 1 if districtW18 == 10699 
replace GB19_outcomeW18 = 1 if districtW18 == 10700 
replace GB19_outcomeW18 = 2 if districtW18 == 10701 
replace GB19_outcomeW18 = -9999 if districtW18 == 40007 
replace GB19_outcomeW18 = 1 if districtW18 == 10702 
replace GB19_outcomeW18 = 1 if districtW18 == 10703 
replace GB19_outcomeW18 = 1 if districtW18 == 10704 
replace GB19_outcomeW18 = 1 if districtW18 == 10705 
replace GB19_outcomeW18 = -9999 if districtW18 == 40008 
replace GB19_outcomeW18 = 1 if districtW18 == 10706 
replace GB19_outcomeW18 = 1 if districtW18 == 10707 
replace GB19_outcomeW18 = 2 if districtW18 == 10708 
replace GB19_outcomeW18 = 2 if districtW18 == 10709 
replace GB19_outcomeW18 = 1 if districtW18 == 10710 
replace GB19_outcomeW18 = 1 if districtW18 == 10711 
replace GB19_outcomeW18 = 4 if districtW18 == 20029 
replace GB19_outcomeW18 = 4 if districtW18 == 20030 
replace GB19_outcomeW18 = 4 if districtW18 == 20031 
replace GB19_outcomeW18 = 4 if districtW18 == 20032 
replace GB19_outcomeW18 = 4 if districtW18 == 20033 
replace GB19_outcomeW18 = 4 if districtW18 == 20034 
replace GB19_outcomeW18 = 4 if districtW18 == 20035 
replace GB19_outcomeW18 = 4 if districtW18 == 20036 
replace GB19_outcomeW18 = 1 if districtW18 == 10712 
replace GB19_outcomeW18 = 4 if districtW18 == 20037 
replace GB19_outcomeW18 = 1 if districtW18 == 10713 
replace GB19_outcomeW18 = 2 if districtW18 == 30046 
replace GB19_outcomeW18 = 1 if districtW18 == 10714 
replace GB19_outcomeW18 = 1 if districtW18 == 10715 
replace GB19_outcomeW18 = 1 if districtW18 == 10716 
replace GB19_outcomeW18 = 1 if districtW18 == 10717 
replace GB19_outcomeW18 = 2 if districtW18 == 10718 
replace GB19_outcomeW18 = 1 if districtW18 == 10719 
replace GB19_outcomeW18 = 2 if districtW18 == 10720 
replace GB19_outcomeW18 = 2 if districtW18 == 10721 
replace GB19_outcomeW18 = 1 if districtW18 == 10722 
replace GB19_outcomeW18 = 2 if districtW18 == 10723 
replace GB19_outcomeW18 = 1 if districtW18 == 10724 
replace GB19_outcomeW18 = 2 if districtW18 == 10725 
replace GB19_outcomeW18 = 2 if districtW18 == 10726 
replace GB19_outcomeW18 = 2 if districtW18 == 10727 
replace GB19_outcomeW18 = 1 if districtW18 == 10728 
replace GB19_outcomeW18 = 1 if districtW18 == 10729 
replace GB19_outcomeW18 = 1 if districtW18 == 10730 
replace GB19_outcomeW18 = 1 if districtW18 == 10731 
replace GB19_outcomeW18 = 2 if districtW18 == 10732 
replace GB19_outcomeW18 = 2 if districtW18 == 10733 
replace GB19_outcomeW18 = 1 if districtW18 == 10734 
replace GB19_outcomeW18 = 1 if districtW18 == 10735 
replace GB19_outcomeW18 = 1 if districtW18 == 10736 
replace GB19_outcomeW18 = 2 if districtW18 == 10737 
replace GB19_outcomeW18 = 1 if districtW18 == 10738 
replace GB19_outcomeW18 = 1 if districtW18 == 10739 
replace GB19_outcomeW18 = 2 if districtW18 == 10740 
replace GB19_outcomeW18 = 1 if districtW18 == 10741 
replace GB19_outcomeW18 = 1 if districtW18 == 10742 
replace GB19_outcomeW18 = 1 if districtW18 == 10743 
replace GB19_outcomeW18 = 1 if districtW18 == 10744 
replace GB19_outcomeW18 = 1 if districtW18 == 10745 
replace GB19_outcomeW18 = 1 if districtW18 == 10746 
replace GB19_outcomeW18 = 1 if districtW18 == 10747 
replace GB19_outcomeW18 = 1 if districtW18 == 10748 
replace GB19_outcomeW18 = 1 if districtW18 == 10749 
replace GB19_outcomeW18 = 2 if districtW18 == 10750 
replace GB19_outcomeW18 = 1 if districtW18 == 10751 
replace GB19_outcomeW18 = 2 if districtW18 == 10752 
replace GB19_outcomeW18 = 1 if districtW18 == 10753 
replace GB19_outcomeW18 = 2 if districtW18 == 10754 
replace GB19_outcomeW18 = 2 if districtW18 == 10755 
replace GB19_outcomeW18 = 2 if districtW18 == 10756 
replace GB19_outcomeW18 = 1 if districtW18 == 10757 
replace GB19_outcomeW18 = 1 if districtW18 == 10758 
replace GB19_outcomeW18 = 2 if districtW18 == 10759 
replace GB19_outcomeW18 = 2 if districtW18 == 10760 
replace GB19_outcomeW18 = 4 if districtW18 == 20038 
replace GB19_outcomeW18 = 4 if districtW18 == 20039 
replace GB19_outcomeW18 = 1 if districtW18 == 10761 
replace GB19_outcomeW18 = 1 if districtW18 == 10762 
replace GB19_outcomeW18 = 2 if districtW18 == 10763 
replace GB19_outcomeW18 = 2 if districtW18 == 10764 
replace GB19_outcomeW18 = 2 if districtW18 == 30077 
replace GB19_outcomeW18 = 2 if districtW18 == 10765 
replace GB19_outcomeW18 = 1 if districtW18 == 10766 
replace GB19_outcomeW18 = 1 if districtW18 == 10767 
replace GB19_outcomeW18 = 1 if districtW18 == 10768 
replace GB19_outcomeW18 = 1 if districtW18 == 10769 
replace GB19_outcomeW18 = 4 if districtW18 == 20040 
replace GB19_outcomeW18 = 3 if districtW18 == 10770 
replace GB19_outcomeW18 = 2 if districtW18 == 10771 
replace GB19_outcomeW18 = 2 if districtW18 == 10772 
replace GB19_outcomeW18 = 2 if districtW18 == 10773 
replace GB19_outcomeW18 = 1 if districtW18 == 10774 
replace GB19_outcomeW18 = 4 if districtW18 == 20041 
replace GB19_outcomeW18 = 2 if districtW18 == 10775 
replace GB19_outcomeW18 = -9999 if districtW18 == 40009 
replace GB19_outcomeW18 = 4 if districtW18 == 20042 
replace GB19_outcomeW18 = 2 if districtW18 == 10776 
replace GB19_outcomeW18 = 2 if districtW18 == 10777 
replace GB19_outcomeW18 = 2 if districtW18 == 10778 
replace GB19_outcomeW18 = 2 if districtW18 == 10779 
replace GB19_outcomeW18 = 2 if districtW18 == 10780 
replace GB19_outcomeW18 = 2 if districtW18 == 10781 
replace GB19_outcomeW18 = 2 if districtW18 == 10782 
replace GB19_outcomeW18 = 2 if districtW18 == 10783 
replace GB19_outcomeW18 = 2 if districtW18 == 10784 
replace GB19_outcomeW18 = 1 if districtW18 == 10785 
replace GB19_outcomeW18 = 1 if districtW18 == 10786 
replace GB19_outcomeW18 = 2 if districtW18 == 10789 
replace GB19_outcomeW18 = 2 if districtW18 == 10787 
replace GB19_outcomeW18 = 2 if districtW18 == 10788 
replace GB19_outcomeW18 = 2 if districtW18 == 10790 
replace GB19_outcomeW18 = 1 if districtW18 == 10791 
replace GB19_outcomeW18 = 1 if districtW18 == 10792 
replace GB19_outcomeW18 = 4 if districtW18 == 20043 
replace GB19_outcomeW18 = 2 if districtW18 == 10793 
replace GB19_outcomeW18 = 2 if districtW18 == 10794 
replace GB19_outcomeW18 = 2 if districtW18 == 10795 
replace GB19_outcomeW18 = 2 if districtW18 == 10796 
replace GB19_outcomeW18 = 4 if districtW18 == 20044 
replace GB19_outcomeW18 = 2 if districtW18 == 30045 
replace GB19_outcomeW18 = 1 if districtW18 == 10797 
replace GB19_outcomeW18 = 1 if districtW18 == 10798 
replace GB19_outcomeW18 = 1 if districtW18 == 10799 
replace GB19_outcomeW18 = 2 if districtW18 == 10800 
replace GB19_outcomeW18 = 2 if districtW18 == 10801 
replace GB19_outcomeW18 = 1 if districtW18 == 10802 
replace GB19_outcomeW18 = 1 if districtW18 == 10803 
replace GB19_outcomeW18 = 1 if districtW18 == 10804 
replace GB19_outcomeW18 = 2 if districtW18 == 10805 
replace GB19_outcomeW18 = 1 if districtW18 == 10806 
replace GB19_outcomeW18 = 2 if districtW18 == 10807 
replace GB19_outcomeW18 = 2 if districtW18 == 10808 
replace GB19_outcomeW18 = 2 if districtW18 == 10809 
replace GB19_outcomeW18 = 1 if districtW18 == 10810 
replace GB19_outcomeW18 = 1 if districtW18 == 10811 
replace GB19_outcomeW18 = 1 if districtW18 == 10812 
replace GB19_outcomeW18 = 2 if districtW18 == 30071 
replace GB19_outcomeW18 = 1 if districtW18 == 10813 
replace GB19_outcomeW18 = 1 if districtW18 == 10814 
replace GB19_outcomeW18 = 2 if districtW18 == 10819 
replace GB19_outcomeW18 = 1 if districtW18 == 10820 
replace GB19_outcomeW18 = 1 if districtW18 == 10815 
replace GB19_outcomeW18 = 4 if districtW18 == 20045 
replace GB19_outcomeW18 = 1 if districtW18 == 10816 
replace GB19_outcomeW18 = 1 if districtW18 == 10817 
replace GB19_outcomeW18 = -9999 if districtW18 == 40010 
replace GB19_outcomeW18 = 1 if districtW18 == 10818 
replace GB19_outcomeW18 = 1 if districtW18 == 10821 
replace GB19_outcomeW18 = 1 if districtW18 == 10822 
replace GB19_outcomeW18 = 2 if districtW18 == 10823 
replace GB19_outcomeW18 = 1 if districtW18 == 10824 
replace GB19_outcomeW18 = 1 if districtW18 == 30054 
replace GB19_outcomeW18 = 1 if districtW18 == 30063 
replace GB19_outcomeW18 = 1 if districtW18 == 20046 
replace GB19_outcomeW18 = 1 if districtW18 == 10825 
replace GB19_outcomeW18 = 1 if districtW18 == 10826 
replace GB19_outcomeW18 = 4 if districtW18 == 20047 
replace GB19_outcomeW18 = 4 if districtW18 == 20027 
replace GB19_outcomeW18 = 2 if districtW18 == 30069 
replace GB19_outcomeW18 = 1 if districtW18 == 10829 
replace GB19_outcomeW18 = 1 if districtW18 == 10830 
replace GB19_outcomeW18 = 1 if districtW18 == 10834 
replace GB19_outcomeW18 = 2 if districtW18 == 10831 
replace GB19_outcomeW18 = 2 if districtW18 == 10832 
replace GB19_outcomeW18 = 2 if districtW18 == 10833 
replace GB19_outcomeW18 = 1 if districtW18 == 10827 
replace GB19_outcomeW18 = 1 if districtW18 == 10828 
replace GB19_outcomeW18 = 2 if districtW18 == 30055 
replace GB19_outcomeW18 = 2 if districtW18 == 30056 
replace GB19_outcomeW18 = -9999 if districtW18 == 40011 
replace GB19_outcomeW18 = 1 if districtW18 == 10835 
replace GB19_outcomeW18 = 2 if districtW18 == 10836 
replace GB19_outcomeW18 = 1 if districtW18 == 10861 
replace GB19_outcomeW18 = 1 if districtW18 == 10862 
replace GB19_outcomeW18 = -9999 if districtW18 == 40012 
replace GB19_outcomeW18 = 4 if districtW18 == 20048 
replace GB19_outcomeW18 = 1 if districtW18 == 10837 
replace GB19_outcomeW18 = 1 if districtW18 == 10838 
replace GB19_outcomeW18 = 1 if districtW18 == 10839 
replace GB19_outcomeW18 = -9999 if districtW18 == 40013 
replace GB19_outcomeW18 = 2 if districtW18 == 10840 
replace GB19_outcomeW18 = 1 if districtW18 == 10841 
replace GB19_outcomeW18 = 1 if districtW18 == 10842 
replace GB19_outcomeW18 = 1 if districtW18 == 10843 
replace GB19_outcomeW18 = 3 if districtW18 == 20049 
replace GB19_outcomeW18 = 1 if districtW18 == 10844 
replace GB19_outcomeW18 = 1 if districtW18 == 10845 
replace GB19_outcomeW18 = 1 if districtW18 == 10846 
replace GB19_outcomeW18 = 1 if districtW18 == 10847 
replace GB19_outcomeW18 = 1 if districtW18 == 10848 
replace GB19_outcomeW18 = 1 if districtW18 == 10849 
replace GB19_outcomeW18 = 1 if districtW18 == 10850 
replace GB19_outcomeW18 = 1 if districtW18 == 10851 
replace GB19_outcomeW18 = 1 if districtW18 == 10852 
replace GB19_outcomeW18 = 2 if districtW18 == 10853 
replace GB19_outcomeW18 = 1 if districtW18 == 10854 
replace GB19_outcomeW18 = 1 if districtW18 == 10855 
replace GB19_outcomeW18 = 1 if districtW18 == 10856 
replace GB19_outcomeW18 = 1 if districtW18 == 10857 
replace GB19_outcomeW18 = 1 if districtW18 == 10858 
replace GB19_outcomeW18 = 1 if districtW18 == 10859 
replace GB19_outcomeW18 = 1 if districtW18 == 10860 
replace GB19_outcomeW18 = 1 if districtW18 == 10863 
replace GB19_outcomeW18 = 2 if districtW18 == 10864 
replace GB19_outcomeW18 = 2 if districtW18 == 10865 
replace GB19_outcomeW18 = 2 if districtW18 == 10866 
replace GB19_outcomeW18 = 2 if districtW18 == 10867 
replace GB19_outcomeW18 = 1 if districtW18 == 10868 
replace GB19_outcomeW18 = 4 if districtW18 == 20050 
replace GB19_outcomeW18 = 2 if districtW18 == 30074 
replace GB19_outcomeW18 = 1 if districtW18 == 10869 
replace GB19_outcomeW18 = 2 if districtW18 == 10870 
replace GB19_outcomeW18 = 2 if districtW18 == 10871 
replace GB19_outcomeW18 = 3 if districtW18 == 20051 
replace GB19_outcomeW18 = 1 if districtW18 == 10872 
replace GB19_outcomeW18 = 2 if districtW18 == 10873 
replace GB19_outcomeW18 = 3 if districtW18 == 10874 
replace GB19_outcomeW18 = 4 if districtW18 == 20052 
replace GB19_outcomeW18 = 4 if districtW18 == 20053 
replace GB19_outcomeW18 = 1 if districtW18 == 10875 
replace GB19_outcomeW18 = 1 if districtW18 == 10876 
replace GB19_outcomeW18 = 1 if districtW18 == 10877 
replace GB19_outcomeW18 = 4 if districtW18 == 20054 
replace GB19_outcomeW18 = 1 if districtW18 == 10878 
replace GB19_outcomeW18 = 1 if districtW18 == 10879 
replace GB19_outcomeW18 = 2 if districtW18 == 10880 
replace GB19_outcomeW18 = 2 if districtW18 == 30075 
replace GB19_outcomeW18 = 1 if districtW18 == 10881 
replace GB19_outcomeW18 = 2 if districtW18 == 10882 
replace GB19_outcomeW18 = 1 if districtW18 == 10883 
replace GB19_outcomeW18 = 2 if districtW18 == 10884 
replace GB19_outcomeW18 = 1 if districtW18 == 30065 
replace GB19_outcomeW18 = 2 if districtW18 == 10885 
replace GB19_outcomeW18 = 1 if districtW18 == 10886 
replace GB19_outcomeW18 = 2 if districtW18 == 10887 
replace GB19_outcomeW18 = 1 if districtW18 == 10888 
replace GB19_outcomeW18 = 2 if districtW18 == 10889 
replace GB19_outcomeW18 = 1 if districtW18 == 10890 
replace GB19_outcomeW18 = 1 if districtW18 == 10891 
replace GB19_outcomeW18 = 1 if districtW18 == 10892 
replace GB19_outcomeW18 = 1 if districtW18 == 10893 
replace GB19_outcomeW18 = 2 if districtW18 == 30052 
replace GB19_outcomeW18 = 1 if districtW18 == 10894 
replace GB19_outcomeW18 = 3 if districtW18 == 10896 
replace GB19_outcomeW18 = 1 if districtW18 == 10895 
replace GB19_outcomeW18 = 2 if districtW18 == 10897 
replace GB19_outcomeW18 = 1 if districtW18 == 10898 
replace GB19_outcomeW18 = 1 if districtW18 == 10899 
replace GB19_outcomeW18 = 1 if districtW18 == 10900 
replace GB19_outcomeW18 = 1 if districtW18 == 10901 
replace GB19_outcomeW18 = 1 if districtW18 == 10902 
replace GB19_outcomeW18 = 4 if districtW18 == 20055 
replace GB19_outcomeW18 = 2 if districtW18 == 10904 
replace GB19_outcomeW18 = 1 if districtW18 == 10903 
replace GB19_outcomeW18 = 1 if districtW18 == 10905 
replace GB19_outcomeW18 = 1 if districtW18 == 10906 
replace GB19_outcomeW18 = 1 if districtW18 == 10907 
replace GB19_outcomeW18 = 1 if districtW18 == 10908 
replace GB19_outcomeW18 = 4 if districtW18 == 20056 
replace GB19_outcomeW18 = 1 if districtW18 == 10909 
replace GB19_outcomeW18 = 1 if districtW18 == 10910 
replace GB19_outcomeW18 = 2 if districtW18 == 10911 
replace GB19_outcomeW18 = 1 if districtW18 == 10912 
replace GB19_outcomeW18 = 1 if districtW18 == 10913 
replace GB19_outcomeW18 = 1 if districtW18 == 10914 
replace GB19_outcomeW18 = 1 if districtW18 == 10915 
replace GB19_outcomeW18 = 2 if districtW18 == 10916 
replace GB19_outcomeW18 = 1 if districtW18 == 10917 
replace GB19_outcomeW18 = 1 if districtW18 == 10918 
replace GB19_outcomeW18 = 2 if districtW18 == 10921 
replace GB19_outcomeW18 = 2 if districtW18 == 10919 
replace GB19_outcomeW18 = 2 if districtW18 == 10922 
replace GB19_outcomeW18 = 2 if districtW18 == 10923 
replace GB19_outcomeW18 = 2 if districtW18 == 10920 
replace GB19_outcomeW18 = 1 if districtW18 == 10924 
replace GB19_outcomeW18 = 1 if districtW18 == 10925 
replace GB19_outcomeW18 = 1 if districtW18 == 10926 
replace GB19_outcomeW18 = 1 if districtW18 == 10927 
replace GB19_outcomeW18 = 1 if districtW18 == 10928 
replace GB19_outcomeW18 = 1 if districtW18 == 10929 
replace GB19_outcomeW18 = 2 if districtW18 == 10930 
replace GB19_outcomeW18 = 1 if districtW18 == 10931 
replace GB19_outcomeW18 = 1 if districtW18 == 10932 
replace GB19_outcomeW18 = 1 if districtW18 == 10955 
replace GB19_outcomeW18 = 2 if districtW18 == 10956 
replace GB19_outcomeW18 = -9999 if districtW18 == 40014 
replace GB19_outcomeW18 = 1 if districtW18 == 10933 
replace GB19_outcomeW18 = 1 if districtW18 == 10934 
replace GB19_outcomeW18 = 1 if districtW18 == 10935 
replace GB19_outcomeW18 = 1 if districtW18 == 10936 
replace GB19_outcomeW18 = -9999 if districtW18 == 40015 
replace GB19_outcomeW18 = 1 if districtW18 == 10937 
replace GB19_outcomeW18 = 1 if districtW18 == 10938 
replace GB19_outcomeW18 = 1 if districtW18 == 10957 
replace GB19_outcomeW18 = 1 if districtW18 == 10939 
replace GB19_outcomeW18 = 1 if districtW18 == 10940 
replace GB19_outcomeW18 = 1 if districtW18 == 10941 
replace GB19_outcomeW18 = 1 if districtW18 == 10942 
replace GB19_outcomeW18 = 1 if districtW18 == 10958 
replace GB19_outcomeW18 = 1 if districtW18 == 10943 
replace GB19_outcomeW18 = 2 if districtW18 == 10944 
replace GB19_outcomeW18 = 1 if districtW18 == 10945 
replace GB19_outcomeW18 = 1 if districtW18 == 10946 
replace GB19_outcomeW18 = 1 if districtW18 == 10947 
replace GB19_outcomeW18 = 1 if districtW18 == 10948 
replace GB19_outcomeW18 = 1 if districtW18 == 10949 
replace GB19_outcomeW18 = 1 if districtW18 == 10950 
replace GB19_outcomeW18 = 1 if districtW18 == 10951 
replace GB19_outcomeW18 = 1 if districtW18 == 10952 
replace GB19_outcomeW18 = 1 if districtW18 == 10953 
replace GB19_outcomeW18 = 1 if districtW18 == 10954 
replace GB19_outcomeW18 = 1 if districtW18 == 10959 
replace GB19_outcomeW18 = 1 if districtW18 == 10965 
replace GB19_outcomeW18 = 1 if districtW18 == 10966 
replace GB19_outcomeW18 = 3 if districtW18 == 10960 
replace GB19_outcomeW18 = 2 if districtW18 == 10967 
replace GB19_outcomeW18 = 1 if districtW18 == 10961 
replace GB19_outcomeW18 = 1 if districtW18 == 10968 
replace GB19_outcomeW18 = 2 if districtW18 == 10962 
replace GB19_outcomeW18 = 2 if districtW18 == 10963 
replace GB19_outcomeW18 = 4 if districtW18 == 20057 
replace GB19_outcomeW18 = 1 if districtW18 == 10964 
replace GB19_outcomeW18 = 2 if districtW18 == 10969 
replace GB19_outcomeW18 = 2 if districtW18 == 10970 
replace GB19_outcomeW18 = 1 if districtW18 == 10971 
replace GB19_outcomeW18 = 1 if districtW18 == 10972 
replace GB19_outcomeW18 = 1 if districtW18 == 10973 
replace GB19_outcomeW18 = 1 if districtW18 == 10974 
replace GB19_outcomeW18 = 1 if districtW18 == 10975 
replace GB19_outcomeW18 = 1 if districtW18 == 10976 
replace GB19_outcomeW18 = -9999 if districtW18 == 40016 
replace GB19_outcomeW18 = 1 if districtW18 == 10977 
replace GB19_outcomeW18 = 2 if districtW18 == 10978 
replace GB19_outcomeW18 = 2 if districtW18 == 10979 
replace GB19_outcomeW18 = 1 if districtW18 == 10980 
replace GB19_outcomeW18 = 1 if districtW18 == 10981 
replace GB19_outcomeW18 = 2 if districtW18 == 10982 
replace GB19_outcomeW18 = 1 if districtW18 == 10983 
replace GB19_outcomeW18 = 1 if districtW18 == 10984 
replace GB19_outcomeW18 = 1 if districtW18 == 10985 
replace GB19_outcomeW18 = 2 if districtW18 == 30048 
replace GB19_outcomeW18 = 2 if districtW18 == 30047 
replace GB19_outcomeW18 = 1 if districtW18 == 10986 
replace GB19_outcomeW18 = 1 if districtW18 == 10987 
replace GB19_outcomeW18 = 1 if districtW18 == 10988 
replace GB19_outcomeW18 = 1 if districtW18 == 10989 
replace GB19_outcomeW18 = 1 if districtW18 == 10990 
replace GB19_outcomeW18 = 1 if districtW18 == 10991 
replace GB19_outcomeW18 = 1 if districtW18 == 10992 
replace GB19_outcomeW18 = 1 if districtW18 == 10993 
replace GB19_outcomeW18 = 1 if districtW18 == 10994 
replace GB19_outcomeW18 = 1 if districtW18 == 10995 
replace GB19_outcomeW18 = 1 if districtW18 == 10996 
replace GB19_outcomeW18 = 1 if districtW18 == 10997 
replace GB19_outcomeW18 = 2 if districtW18 == 10998 
replace GB19_outcomeW18 = 1 if districtW18 == 10999 
replace GB19_outcomeW18 = 2 if districtW18 == 30053 
replace GB19_outcomeW18 = 1 if districtW18 == 11000 
replace GB19_outcomeW18 = 1 if districtW18 == 11001 
replace GB19_outcomeW18 = 2 if districtW18 == 11002 
replace GB19_outcomeW18 = 1 if districtW18 == 11003 
replace GB19_outcomeW18 = 1 if districtW18 == 11004 
replace GB19_outcomeW18 = 3 if districtW18 == 11005 
replace GB19_outcomeW18 = 2 if districtW18 == 11006 
replace GB19_outcomeW18 = -9999 if districtW18 == 40017 
replace GB19_outcomeW18 = 1 if districtW18 == 11007 
replace GB19_outcomeW18 = 1 if districtW18 == 30060 
replace GB19_outcomeW18 = 1 if districtW18 == 30078 
replace GB19_outcomeW18 = 2 if districtW18 == 11008 
replace GB19_outcomeW18 = 1 if districtW18 == 11009 
replace GB19_outcomeW18 = 2 if districtW18 == 11010 
replace GB19_outcomeW18 = 1 if districtW18 == 11011 
replace GB19_outcomeW18 = 2 if districtW18 == 11012 
replace GB19_outcomeW18 = 2 if districtW18 == 11013 
replace GB19_outcomeW18 = 2 if districtW18 == 11014 
replace GB19_outcomeW18 = 1 if districtW18 == 11015 
replace GB19_outcomeW18 = 2 if districtW18 == 11016 
replace GB19_outcomeW18 = 2 if districtW18 == 11017 
replace GB19_outcomeW18 = 1 if districtW18 == 11018 
replace GB19_outcomeW18 = 2 if districtW18 == 11019 
replace GB19_outcomeW18 = 2 if districtW18 == 11020 
replace GB19_outcomeW18 = 1 if districtW18 == 11021 
replace GB19_outcomeW18 = 1 if districtW18 == 11022 
replace GB19_outcomeW18 = 1 if districtW18 == 11023 
replace GB19_outcomeW18 = 2 if districtW18 == 11024 
replace GB19_outcomeW18 = 1 if districtW18 == 11025 
replace GB19_outcomeW18 = 1 if districtW18 == 11026 
replace GB19_outcomeW18 = 1 if districtW18 == 11027 
replace GB19_outcomeW18 = 2 if districtW18 == 11028 
replace GB19_outcomeW18 = 1 if districtW18 == 20058 
replace GB19_outcomeW18 = 1 if districtW18 == 11029 
replace GB19_outcomeW18 = 1 if districtW18 == 11030 
replace GB19_outcomeW18 = 1 if districtW18 == 11031 
replace GB19_outcomeW18 = 4 if districtW18 == 20059 
replace GB19_outcomeW18 = 2 if districtW18 == 11032 
replace GB19_outcomeW18 = 2 if districtW18 == 11033 
replace GB19_outcomeW18 = 2 if districtW18 == 11036 
replace GB19_outcomeW18 = 3 if districtW18 == 11037 
replace GB19_outcomeW18 = 1 if districtW18 == 11038 
replace GB19_outcomeW18 = 1 if districtW18 == 11034 
replace GB19_outcomeW18 = -9999 if districtW18 == 40018 
replace GB19_outcomeW18 = 1 if districtW18 == 11035 
replace GB19_outcomeW18 = 2 if districtW18 == 11039 
replace GB19_outcomeW18 = 1 if districtW18 == 11040 
replace GB19_outcomeW18 = 1 if districtW18 == 11041 
replace GB19_outcomeW18 = 1 if districtW18 == 11042 
replace GB19_outcomeW18 = 2 if districtW18 == 11043 
replace GB19_outcomeW18 = 2 if districtW18 == 11044 
replace GB19_outcomeW18 = 1 if districtW18 == 11045 
replace GB19_outcomeW18 = 1 if districtW18 == 11046 
replace GB19_outcomeW18 = 1 if districtW18 == 11047 
replace GB19_outcomeW18 = 1 if districtW18 == 11048 
replace GB19_outcomeW18 = 1 if districtW18 == 11049 
replace GB19_outcomeW18 = 2 if districtW18 == 11050 
replace GB19_outcomeW18 = 1 if districtW18 == 11051 
replace GB19_outcomeW18 = 1 if districtW18 == 11052 
replace GB19_outcomeW18 = 1 if districtW18 == 11053 
replace GB19_outcomeW18 = 2 if districtW18 == 11054 
replace GB19_outcomeW18 = 1 if districtW18 == 11055 
replace GB19_outcomeW18 = 1 if districtW18 == 30044 
replace GB19_outcomeW18 = 1 if districtW18 == 11056 
replace GB19_outcomeW18 = 1 if districtW18 == 11057 
replace GB19_outcomeW18 = 1 if districtW18 == 11058 
replace GB19_outcomeW18 = 2 if districtW18 == 11059 
replace GB19_outcomeW18 = 1 if districtW18 == 11060 
replace GB19_outcomeW18 = 1 if districtW18 == 30041 
replace GB19_outcomeW18 = 2 if districtW18 == 11061 
replace GB19_outcomeW18 = 1 if districtW18 == 11062


******************************************************
** INCUMBENT PARTY REELECTED: 2015 GENERAL ELECTION **
******************************************************

gen GB15_reelectedW4 = .

replace GB15_reelectedW4 = 1 if districtW4 == 10530
replace GB15_reelectedW4 = 1 if districtW4 == 10531
replace GB15_reelectedW4 = 1 if districtW4 == 10532
replace GB15_reelectedW4 = 1 if districtW4 == 10533
replace GB15_reelectedW4 = 1 if districtW4 == 10534
replace GB15_reelectedW4 = 1 if districtW4 == 10535
replace GB15_reelectedW4 = 1 if districtW4 == 10536
replace GB15_reelectedW4 = 1 if districtW4 == 10537
replace GB15_reelectedW4 = 1 if districtW4 == 10538
replace GB15_reelectedW4 = 1 if districtW4 == 10539
replace GB15_reelectedW4 = 1 if districtW4 == 10540
replace GB15_reelectedW4 = 1 if districtW4 == 10541
replace GB15_reelectedW4 = 1 if districtW4 == 10542
replace GB15_reelectedW4 = 0 if districtW4 == 10543
replace GB15_reelectedW4 = 1 if districtW4 == 10544
replace GB15_reelectedW4 = 1 if districtW4 == 10545
replace GB15_reelectedW4 = 1 if districtW4 == 10546
replace GB15_reelectedW4 = 0 if districtW4 == 10547
replace GB15_reelectedW4 = 1 if districtW4 == 10548
replace GB15_reelectedW4 = 1 if districtW4 == 10549
replace GB15_reelectedW4 = 1 if districtW4 == 10550
replace GB15_reelectedW4 = 1 if districtW4 == 10551
replace GB15_reelectedW4 = 1 if districtW4 == 10552
replace GB15_reelectedW4 = 0 if districtW4 == 10553
replace GB15_reelectedW4 = 0 if districtW4 == 10554
replace GB15_reelectedW4 = 1 if districtW4 == 10555
replace GB15_reelectedW4 = 1 if districtW4 == 10556
replace GB15_reelectedW4 = 1 if districtW4 == 10557
replace GB15_reelectedW4 = 1 if districtW4 == 10558
replace GB15_reelectedW4 = 1 if districtW4 == 10559
replace GB15_reelectedW4 = 1 if districtW4 == 10560
replace GB15_reelectedW4 = 1 if districtW4 == 10561
replace GB15_reelectedW4 = 1 if districtW4 == 10562
replace GB15_reelectedW4 = 1 if districtW4 == 10563
replace GB15_reelectedW4 = 1 if districtW4 == 10564
replace GB15_reelectedW4 = 1 if districtW4 == 10565
replace GB15_reelectedW4 = 1 if districtW4 == 10566
replace GB15_reelectedW4 = 1 if districtW4 == 10567
replace GB15_reelectedW4 = 0 if districtW4 == 10568
replace GB15_reelectedW4 = 1 if districtW4 == 10569
replace GB15_reelectedW4 = 1 if districtW4 == 10570
replace GB15_reelectedW4 = 1 if districtW4 == 10571
replace GB15_reelectedW4 = 1 if districtW4 == 10572
replace GB15_reelectedW4 = 1 if districtW4 == 10573
replace GB15_reelectedW4 = 1 if districtW4 == 10574
replace GB15_reelectedW4 = 1 if districtW4 == 10575
replace GB15_reelectedW4 = 1 if districtW4 == 10576
replace GB15_reelectedW4 = 1 if districtW4 == 10577
replace GB15_reelectedW4 = 1 if districtW4 == 10578
replace GB15_reelectedW4 = 1 if districtW4 == 10579
replace GB15_reelectedW4 = 0 if districtW4 == 10580
replace GB15_reelectedW4 = 1 if districtW4 == 10581
replace GB15_reelectedW4 = 1 if districtW4 == 10582
replace GB15_reelectedW4 = 1 if districtW4 == 10583
replace GB15_reelectedW4 = 1 if districtW4 == 10584
replace GB15_reelectedW4 = 1 if districtW4 == 10585
replace GB15_reelectedW4 = 1 if districtW4 == 10586
replace GB15_reelectedW4 = 0 if districtW4 == 10587
replace GB15_reelectedW4 = 1 if districtW4 == 10588
replace GB15_reelectedW4 = 1 if districtW4 == 10589
replace GB15_reelectedW4 = 1 if districtW4 == 10590
replace GB15_reelectedW4 = 0 if districtW4 == 10591
replace GB15_reelectedW4 = 1 if districtW4 == 10592
replace GB15_reelectedW4 = 0 if districtW4 == 10593
replace GB15_reelectedW4 = 1 if districtW4 == 10594
replace GB15_reelectedW4 = 1 if districtW4 == 10595
replace GB15_reelectedW4 = 1 if districtW4 == 10596
replace GB15_reelectedW4 = 1 if districtW4 == 10597
replace GB15_reelectedW4 = 1 if districtW4 == 10598
replace GB15_reelectedW4 = 1 if districtW4 == 10599
replace GB15_reelectedW4 = 1 if districtW4 == 10600
replace GB15_reelectedW4 = 1 if districtW4 == 10601
replace GB15_reelectedW4 = 0 if districtW4 == 10602
replace GB15_reelectedW4 = 1 if districtW4 == 10603
replace GB15_reelectedW4 = 1 if districtW4 == 10604
replace GB15_reelectedW4 = 1 if districtW4 == 10605
replace GB15_reelectedW4 = 1 if districtW4 == 10606
replace GB15_reelectedW4 = 1 if districtW4 == 10607
replace GB15_reelectedW4 = 1 if districtW4 == 10608
replace GB15_reelectedW4 = 0 if districtW4 == 10609
replace GB15_reelectedW4 = 1 if districtW4 == 10610
replace GB15_reelectedW4 = 1 if districtW4 == 10611
replace GB15_reelectedW4 = 1 if districtW4 == 10612
replace GB15_reelectedW4 = 1 if districtW4 == 10613
replace GB15_reelectedW4 = 1 if districtW4 == 10614
replace GB15_reelectedW4 = 1 if districtW4 == 10615
replace GB15_reelectedW4 = 1 if districtW4 == 10616
replace GB15_reelectedW4 = 0 if districtW4 == 10617
replace GB15_reelectedW4 = 1 if districtW4 == 10618
replace GB15_reelectedW4 = 1 if districtW4 == 10619
replace GB15_reelectedW4 = 1 if districtW4 == 10620
replace GB15_reelectedW4 = 1 if districtW4 == 10621
replace GB15_reelectedW4 = 1 if districtW4 == 10622
replace GB15_reelectedW4 = 1 if districtW4 == 10623
replace GB15_reelectedW4 = 1 if districtW4 == 10624
replace GB15_reelectedW4 = 1 if districtW4 == 10625
replace GB15_reelectedW4 = 1 if districtW4 == 10626
replace GB15_reelectedW4 = 0 if districtW4 == 10627
replace GB15_reelectedW4 = 1 if districtW4 == 10628
replace GB15_reelectedW4 = 1 if districtW4 == 10629
replace GB15_reelectedW4 = 0 if districtW4 == 10630
replace GB15_reelectedW4 = 1 if districtW4 == 10631
replace GB15_reelectedW4 = 1 if districtW4 == 10632
replace GB15_reelectedW4 = 1 if districtW4 == 10633
replace GB15_reelectedW4 = 1 if districtW4 == 10634
replace GB15_reelectedW4 = 0 if districtW4 == 10635
replace GB15_reelectedW4 = 1 if districtW4 == 10636
replace GB15_reelectedW4 = 1 if districtW4 == 10637
replace GB15_reelectedW4 = 1 if districtW4 == 10638
replace GB15_reelectedW4 = 1 if districtW4 == 10639
replace GB15_reelectedW4 = 0 if districtW4 == 10640
replace GB15_reelectedW4 = 1 if districtW4 == 10641
replace GB15_reelectedW4 = 0 if districtW4 == 10642
replace GB15_reelectedW4 = 1 if districtW4 == 10643
replace GB15_reelectedW4 = 0 if districtW4 == 10644
replace GB15_reelectedW4 = 1 if districtW4 == 10645
replace GB15_reelectedW4 = 1 if districtW4 == 10646
replace GB15_reelectedW4 = 1 if districtW4 == 10647
replace GB15_reelectedW4 = 1 if districtW4 == 10648
replace GB15_reelectedW4 = 1 if districtW4 == 10649
replace GB15_reelectedW4 = 1 if districtW4 == 10650
replace GB15_reelectedW4 = 1 if districtW4 == 10651
replace GB15_reelectedW4 = 1 if districtW4 == 10652
replace GB15_reelectedW4 = 1 if districtW4 == 10653
replace GB15_reelectedW4 = 1 if districtW4 == 10654
replace GB15_reelectedW4 = 0 if districtW4 == 10655
replace GB15_reelectedW4 = 1 if districtW4 == 10656
replace GB15_reelectedW4 = 1 if districtW4 == 10657
replace GB15_reelectedW4 = 1 if districtW4 == 10658
replace GB15_reelectedW4 = 1 if districtW4 == 10659
replace GB15_reelectedW4 = 1 if districtW4 == 10660
replace GB15_reelectedW4 = 1 if districtW4 == 10661
replace GB15_reelectedW4 = 0 if districtW4 == 10662
replace GB15_reelectedW4 = 1 if districtW4 == 10663
replace GB15_reelectedW4 = 1 if districtW4 == 10664
replace GB15_reelectedW4 = 1 if districtW4 == 10665
replace GB15_reelectedW4 = 0 if districtW4 == 10666
replace GB15_reelectedW4 = 1 if districtW4 == 10667
replace GB15_reelectedW4 = 1 if districtW4 == 10668
replace GB15_reelectedW4 = 1 if districtW4 == 10669
replace GB15_reelectedW4 = 1 if districtW4 == 10670
replace GB15_reelectedW4 = 1 if districtW4 == 10671
replace GB15_reelectedW4 = 1 if districtW4 == 10672
replace GB15_reelectedW4 = 1 if districtW4 == 10673
replace GB15_reelectedW4 = 0 if districtW4 == 10674
replace GB15_reelectedW4 = 1 if districtW4 == 10675
replace GB15_reelectedW4 = 1 if districtW4 == 10676
replace GB15_reelectedW4 = 1 if districtW4 == 10677
replace GB15_reelectedW4 = 1 if districtW4 == 10678
replace GB15_reelectedW4 = 1 if districtW4 == 10679
replace GB15_reelectedW4 = 1 if districtW4 == 10680
replace GB15_reelectedW4 = 1 if districtW4 == 10681
replace GB15_reelectedW4 = 1 if districtW4 == 10682
replace GB15_reelectedW4 = 1 if districtW4 == 10683
replace GB15_reelectedW4 = 0 if districtW4 == 10684
replace GB15_reelectedW4 = 0 if districtW4 == 10685
replace GB15_reelectedW4 = 1 if districtW4 == 10686
replace GB15_reelectedW4 = 0 if districtW4 == 10687
replace GB15_reelectedW4 = 1 if districtW4 == 10688
replace GB15_reelectedW4 = 1 if districtW4 == 10689
replace GB15_reelectedW4 = 1 if districtW4 == 10690
replace GB15_reelectedW4 = 0 if districtW4 == 10691
replace GB15_reelectedW4 = 1 if districtW4 == 10692
replace GB15_reelectedW4 = 1 if districtW4 == 10693
replace GB15_reelectedW4 = 1 if districtW4 == 10694
replace GB15_reelectedW4 = 1 if districtW4 == 10695
replace GB15_reelectedW4 = 1 if districtW4 == 10696
replace GB15_reelectedW4 = 1 if districtW4 == 10697
replace GB15_reelectedW4 = 1 if districtW4 == 10698
replace GB15_reelectedW4 = 1 if districtW4 == 10699
replace GB15_reelectedW4 = 1 if districtW4 == 10700
replace GB15_reelectedW4 = 0 if districtW4 == 10701
replace GB15_reelectedW4 = 1 if districtW4 == 10702
replace GB15_reelectedW4 = 1 if districtW4 == 10703
replace GB15_reelectedW4 = 1 if districtW4 == 10704
replace GB15_reelectedW4 = 1 if districtW4 == 10705
replace GB15_reelectedW4 = 1 if districtW4 == 10706
replace GB15_reelectedW4 = 1 if districtW4 == 10707
replace GB15_reelectedW4 = 1 if districtW4 == 10708
replace GB15_reelectedW4 = 1 if districtW4 == 10709
replace GB15_reelectedW4 = 1 if districtW4 == 10710
replace GB15_reelectedW4 = 1 if districtW4 == 10711
replace GB15_reelectedW4 = 1 if districtW4 == 10712
replace GB15_reelectedW4 = 1 if districtW4 == 10713
replace GB15_reelectedW4 = 1 if districtW4 == 10714
replace GB15_reelectedW4 = 1 if districtW4 == 10715
replace GB15_reelectedW4 = 1 if districtW4 == 10716
replace GB15_reelectedW4 = 1 if districtW4 == 10717
replace GB15_reelectedW4 = 1 if districtW4 == 10718
replace GB15_reelectedW4 = 1 if districtW4 == 10719
replace GB15_reelectedW4 = 1 if districtW4 == 10720
replace GB15_reelectedW4 = 0 if districtW4 == 10721
replace GB15_reelectedW4 = 1 if districtW4 == 10722
replace GB15_reelectedW4 = 1 if districtW4 == 10723
replace GB15_reelectedW4 = 1 if districtW4 == 10724
replace GB15_reelectedW4 = 1 if districtW4 == 10725
replace GB15_reelectedW4 = 1 if districtW4 == 10726
replace GB15_reelectedW4 = 1 if districtW4 == 10727
replace GB15_reelectedW4 = 1 if districtW4 == 10728
replace GB15_reelectedW4 = 1 if districtW4 == 10729
replace GB15_reelectedW4 = 1 if districtW4 == 10730
replace GB15_reelectedW4 = 1 if districtW4 == 10731
replace GB15_reelectedW4 = 0 if districtW4 == 10732
replace GB15_reelectedW4 = 1 if districtW4 == 10733
replace GB15_reelectedW4 = 1 if districtW4 == 10734
replace GB15_reelectedW4 = 1 if districtW4 == 10735
replace GB15_reelectedW4 = 1 if districtW4 == 10736
replace GB15_reelectedW4 = 1 if districtW4 == 10737
replace GB15_reelectedW4 = 0 if districtW4 == 10738
replace GB15_reelectedW4 = 1 if districtW4 == 10739
replace GB15_reelectedW4 = 1 if districtW4 == 10740
replace GB15_reelectedW4 = 1 if districtW4 == 10741
replace GB15_reelectedW4 = 1 if districtW4 == 10742
replace GB15_reelectedW4 = 1 if districtW4 == 10743
replace GB15_reelectedW4 = 1 if districtW4 == 10744
replace GB15_reelectedW4 = 1 if districtW4 == 10745
replace GB15_reelectedW4 = 1 if districtW4 == 10746
replace GB15_reelectedW4 = 1 if districtW4 == 10747
replace GB15_reelectedW4 = 1 if districtW4 == 10748
replace GB15_reelectedW4 = 1 if districtW4 == 10749
replace GB15_reelectedW4 = 1 if districtW4 == 10750
replace GB15_reelectedW4 = 1 if districtW4 == 10751
replace GB15_reelectedW4 = 0 if districtW4 == 10752
replace GB15_reelectedW4 = 1 if districtW4 == 10753
replace GB15_reelectedW4 = 1 if districtW4 == 10754
replace GB15_reelectedW4 = 0 if districtW4 == 10755
replace GB15_reelectedW4 = 0 if districtW4 == 10756
replace GB15_reelectedW4 = 1 if districtW4 == 10757
replace GB15_reelectedW4 = 1 if districtW4 == 10758
replace GB15_reelectedW4 = 0 if districtW4 == 10759
replace GB15_reelectedW4 = 0 if districtW4 == 10760
replace GB15_reelectedW4 = 1 if districtW4 == 10761
replace GB15_reelectedW4 = 1 if districtW4 == 10762
replace GB15_reelectedW4 = 1 if districtW4 == 10763
replace GB15_reelectedW4 = 1 if districtW4 == 10764
replace GB15_reelectedW4 = 1 if districtW4 == 10765
replace GB15_reelectedW4 = 1 if districtW4 == 10766
replace GB15_reelectedW4 = 1 if districtW4 == 10767
replace GB15_reelectedW4 = 1 if districtW4 == 10768
replace GB15_reelectedW4 = 1 if districtW4 == 10769
replace GB15_reelectedW4 = 0 if districtW4 == 10770
replace GB15_reelectedW4 = 1 if districtW4 == 10771
replace GB15_reelectedW4 = 1 if districtW4 == 10772
replace GB15_reelectedW4 = 1 if districtW4 == 10773
replace GB15_reelectedW4 = 1 if districtW4 == 10774
replace GB15_reelectedW4 = 1 if districtW4 == 10775
replace GB15_reelectedW4 = 0 if districtW4 == 10776
replace GB15_reelectedW4 = 1 if districtW4 == 10777
replace GB15_reelectedW4 = 1 if districtW4 == 10778
replace GB15_reelectedW4 = 1 if districtW4 == 10779
replace GB15_reelectedW4 = 1 if districtW4 == 10780
replace GB15_reelectedW4 = 1 if districtW4 == 10781
replace GB15_reelectedW4 = 1 if districtW4 == 10782
replace GB15_reelectedW4 = 0 if districtW4 == 10783
replace GB15_reelectedW4 = 1 if districtW4 == 10784
replace GB15_reelectedW4 = 1 if districtW4 == 10785
replace GB15_reelectedW4 = 0 if districtW4 == 10786
replace GB15_reelectedW4 = 1 if districtW4 == 10787
replace GB15_reelectedW4 = 1 if districtW4 == 10788
replace GB15_reelectedW4 = 1 if districtW4 == 10789
replace GB15_reelectedW4 = 1 if districtW4 == 10790
replace GB15_reelectedW4 = 1 if districtW4 == 10791
replace GB15_reelectedW4 = 1 if districtW4 == 10792
replace GB15_reelectedW4 = 0 if districtW4 == 10793
replace GB15_reelectedW4 = 1 if districtW4 == 10794
replace GB15_reelectedW4 = 0 if districtW4 == 10795
replace GB15_reelectedW4 = 0 if districtW4 == 10796
replace GB15_reelectedW4 = 1 if districtW4 == 10797
replace GB15_reelectedW4 = 1 if districtW4 == 10798
replace GB15_reelectedW4 = 1 if districtW4 == 10799
replace GB15_reelectedW4 = 1 if districtW4 == 10800
replace GB15_reelectedW4 = 0 if districtW4 == 10801
replace GB15_reelectedW4 = 1 if districtW4 == 10802
replace GB15_reelectedW4 = 1 if districtW4 == 10803
replace GB15_reelectedW4 = 1 if districtW4 == 10804
replace GB15_reelectedW4 = 1 if districtW4 == 10805
replace GB15_reelectedW4 = 1 if districtW4 == 10806
replace GB15_reelectedW4 = 0 if districtW4 == 10807
replace GB15_reelectedW4 = 1 if districtW4 == 10808
replace GB15_reelectedW4 = 0 if districtW4 == 10809
replace GB15_reelectedW4 = 1 if districtW4 == 10810
replace GB15_reelectedW4 = 1 if districtW4 == 10811
replace GB15_reelectedW4 = 1 if districtW4 == 10812
replace GB15_reelectedW4 = 1 if districtW4 == 10813
replace GB15_reelectedW4 = 1 if districtW4 == 10814
replace GB15_reelectedW4 = 0 if districtW4 == 10815
replace GB15_reelectedW4 = 1 if districtW4 == 10816
replace GB15_reelectedW4 = 1 if districtW4 == 10817
replace GB15_reelectedW4 = 1 if districtW4 == 10818
replace GB15_reelectedW4 = 1 if districtW4 == 10819
replace GB15_reelectedW4 = 1 if districtW4 == 10820
replace GB15_reelectedW4 = 1 if districtW4 == 10821
replace GB15_reelectedW4 = 1 if districtW4 == 10822
replace GB15_reelectedW4 = 1 if districtW4 == 10823
replace GB15_reelectedW4 = 1 if districtW4 == 10824
replace GB15_reelectedW4 = 1 if districtW4 == 10825
replace GB15_reelectedW4 = 0 if districtW4 == 10826
replace GB15_reelectedW4 = 1 if districtW4 == 10827
replace GB15_reelectedW4 = 1 if districtW4 == 10828
replace GB15_reelectedW4 = 1 if districtW4 == 10829
replace GB15_reelectedW4 = 1 if districtW4 == 10830
replace GB15_reelectedW4 = 1 if districtW4 == 10831
replace GB15_reelectedW4 = 1 if districtW4 == 10832
replace GB15_reelectedW4 = 1 if districtW4 == 10833
replace GB15_reelectedW4 = 1 if districtW4 == 10834
replace GB15_reelectedW4 = 1 if districtW4 == 10835
replace GB15_reelectedW4 = 1 if districtW4 == 10836
replace GB15_reelectedW4 = 0 if districtW4 == 10837
replace GB15_reelectedW4 = 0 if districtW4 == 10838
replace GB15_reelectedW4 = 1 if districtW4 == 10839
replace GB15_reelectedW4 = 1 if districtW4 == 10840
replace GB15_reelectedW4 = 1 if districtW4 == 10841
replace GB15_reelectedW4 = 1 if districtW4 == 10842
replace GB15_reelectedW4 = 1 if districtW4 == 10843
replace GB15_reelectedW4 = 1 if districtW4 == 10844
replace GB15_reelectedW4 = 1 if districtW4 == 10845
replace GB15_reelectedW4 = 1 if districtW4 == 10846
replace GB15_reelectedW4 = 1 if districtW4 == 10847
replace GB15_reelectedW4 = 1 if districtW4 == 10848
replace GB15_reelectedW4 = 1 if districtW4 == 10849
replace GB15_reelectedW4 = 1 if districtW4 == 10850
replace GB15_reelectedW4 = 1 if districtW4 == 10851
replace GB15_reelectedW4 = 1 if districtW4 == 10852
replace GB15_reelectedW4 = 1 if districtW4 == 10853
replace GB15_reelectedW4 = 1 if districtW4 == 10854
replace GB15_reelectedW4 = 1 if districtW4 == 10855
replace GB15_reelectedW4 = 1 if districtW4 == 10856
replace GB15_reelectedW4 = 1 if districtW4 == 10857
replace GB15_reelectedW4 = 1 if districtW4 == 10858
replace GB15_reelectedW4 = 1 if districtW4 == 10859
replace GB15_reelectedW4 = 1 if districtW4 == 10860
replace GB15_reelectedW4 = 1 if districtW4 == 10861
replace GB15_reelectedW4 = 1 if districtW4 == 10862
replace GB15_reelectedW4 = 1 if districtW4 == 10863
replace GB15_reelectedW4 = 0 if districtW4 == 10864
replace GB15_reelectedW4 = 0 if districtW4 == 10865
replace GB15_reelectedW4 = 1 if districtW4 == 10866
replace GB15_reelectedW4 = 1 if districtW4 == 10867
replace GB15_reelectedW4 = 1 if districtW4 == 10868
replace GB15_reelectedW4 = 1 if districtW4 == 10869
replace GB15_reelectedW4 = 1 if districtW4 == 10870
replace GB15_reelectedW4 = 1 if districtW4 == 10871
replace GB15_reelectedW4 = 1 if districtW4 == 10872
replace GB15_reelectedW4 = 1 if districtW4 == 10873
replace GB15_reelectedW4 = 1 if districtW4 == 10874
replace GB15_reelectedW4 = 1 if districtW4 == 10875
replace GB15_reelectedW4 = 1 if districtW4 == 10876
replace GB15_reelectedW4 = 1 if districtW4 == 10877
replace GB15_reelectedW4 = 1 if districtW4 == 10878
replace GB15_reelectedW4 = 0 if districtW4 == 10879
replace GB15_reelectedW4 = 1 if districtW4 == 10880
replace GB15_reelectedW4 = 1 if districtW4 == 10881
replace GB15_reelectedW4 = 1 if districtW4 == 10882
replace GB15_reelectedW4 = 1 if districtW4 == 10883
replace GB15_reelectedW4 = 0 if districtW4 == 10884
replace GB15_reelectedW4 = 0 if districtW4 == 10885
replace GB15_reelectedW4 = 1 if districtW4 == 10886
replace GB15_reelectedW4 = 1 if districtW4 == 10887
replace GB15_reelectedW4 = 1 if districtW4 == 10888
replace GB15_reelectedW4 = 1 if districtW4 == 10889
replace GB15_reelectedW4 = 1 if districtW4 == 10890
replace GB15_reelectedW4 = 0 if districtW4 == 10891
replace GB15_reelectedW4 = 1 if districtW4 == 10892
replace GB15_reelectedW4 = 1 if districtW4 == 10893
replace GB15_reelectedW4 = 1 if districtW4 == 10894
replace GB15_reelectedW4 = 1 if districtW4 == 10895
replace GB15_reelectedW4 = 1 if districtW4 == 10896
replace GB15_reelectedW4 = 1 if districtW4 == 10897
replace GB15_reelectedW4 = 1 if districtW4 == 10898
replace GB15_reelectedW4 = 1 if districtW4 == 10899
replace GB15_reelectedW4 = 1 if districtW4 == 10900
replace GB15_reelectedW4 = 1 if districtW4 == 10901
replace GB15_reelectedW4 = 1 if districtW4 == 10902
replace GB15_reelectedW4 = 1 if districtW4 == 10903
replace GB15_reelectedW4 = 1 if districtW4 == 10904
replace GB15_reelectedW4 = 1 if districtW4 == 10905
replace GB15_reelectedW4 = 1 if districtW4 == 10906
replace GB15_reelectedW4 = 1 if districtW4 == 10907
replace GB15_reelectedW4 = 1 if districtW4 == 10908
replace GB15_reelectedW4 = 1 if districtW4 == 10909
replace GB15_reelectedW4 = 1 if districtW4 == 10910
replace GB15_reelectedW4 = 1 if districtW4 == 10911
replace GB15_reelectedW4 = 1 if districtW4 == 10912
replace GB15_reelectedW4 = 1 if districtW4 == 10913
replace GB15_reelectedW4 = 1 if districtW4 == 10914
replace GB15_reelectedW4 = 1 if districtW4 == 10915
replace GB15_reelectedW4 = 1 if districtW4 == 10916
replace GB15_reelectedW4 = 1 if districtW4 == 10917
replace GB15_reelectedW4 = 1 if districtW4 == 10918
replace GB15_reelectedW4 = 1 if districtW4 == 10919
replace GB15_reelectedW4 = 1 if districtW4 == 10920
replace GB15_reelectedW4 = 1 if districtW4 == 10921
replace GB15_reelectedW4 = 1 if districtW4 == 10922
replace GB15_reelectedW4 = 1 if districtW4 == 10923
replace GB15_reelectedW4 = 1 if districtW4 == 10924
replace GB15_reelectedW4 = 1 if districtW4 == 10925
replace GB15_reelectedW4 = 1 if districtW4 == 10926
replace GB15_reelectedW4 = 1 if districtW4 == 10927
replace GB15_reelectedW4 = 1 if districtW4 == 10928
replace GB15_reelectedW4 = 1 if districtW4 == 10929
replace GB15_reelectedW4 = 1 if districtW4 == 10930
replace GB15_reelectedW4 = 0 if districtW4 == 10931
replace GB15_reelectedW4 = 0 if districtW4 == 10932
replace GB15_reelectedW4 = 1 if districtW4 == 10933
replace GB15_reelectedW4 = 1 if districtW4 == 10934
replace GB15_reelectedW4 = 1 if districtW4 == 10935
replace GB15_reelectedW4 = 1 if districtW4 == 10936
replace GB15_reelectedW4 = 1 if districtW4 == 10937
replace GB15_reelectedW4 = 1 if districtW4 == 10938
replace GB15_reelectedW4 = 1 if districtW4 == 10939
replace GB15_reelectedW4 = 1 if districtW4 == 10940
replace GB15_reelectedW4 = 1 if districtW4 == 10941
replace GB15_reelectedW4 = 1 if districtW4 == 10942
replace GB15_reelectedW4 = 1 if districtW4 == 10943
replace GB15_reelectedW4 = 1 if districtW4 == 10944
replace GB15_reelectedW4 = 1 if districtW4 == 10945
replace GB15_reelectedW4 = 1 if districtW4 == 10946
replace GB15_reelectedW4 = 1 if districtW4 == 10947
replace GB15_reelectedW4 = 1 if districtW4 == 10948
replace GB15_reelectedW4 = 1 if districtW4 == 10949
replace GB15_reelectedW4 = 1 if districtW4 == 10950
replace GB15_reelectedW4 = 1 if districtW4 == 10951
replace GB15_reelectedW4 = 1 if districtW4 == 10952
replace GB15_reelectedW4 = 1 if districtW4 == 10953
replace GB15_reelectedW4 = 1 if districtW4 == 10954
replace GB15_reelectedW4 = 0 if districtW4 == 10955
replace GB15_reelectedW4 = 1 if districtW4 == 10956
replace GB15_reelectedW4 = 1 if districtW4 == 10957
replace GB15_reelectedW4 = 1 if districtW4 == 10958
replace GB15_reelectedW4 = 1 if districtW4 == 10959
replace GB15_reelectedW4 = 1 if districtW4 == 10960
replace GB15_reelectedW4 = 0 if districtW4 == 10961
replace GB15_reelectedW4 = 1 if districtW4 == 10962
replace GB15_reelectedW4 = 1 if districtW4 == 10963
replace GB15_reelectedW4 = 0 if districtW4 == 10964
replace GB15_reelectedW4 = 1 if districtW4 == 10965
replace GB15_reelectedW4 = 1 if districtW4 == 10966
replace GB15_reelectedW4 = 0 if districtW4 == 10967
replace GB15_reelectedW4 = 1 if districtW4 == 10968
replace GB15_reelectedW4 = 1 if districtW4 == 10969
replace GB15_reelectedW4 = 1 if districtW4 == 10970
replace GB15_reelectedW4 = 1 if districtW4 == 10971
replace GB15_reelectedW4 = 1 if districtW4 == 10972
replace GB15_reelectedW4 = 1 if districtW4 == 10973
replace GB15_reelectedW4 = 1 if districtW4 == 10974
replace GB15_reelectedW4 = 1 if districtW4 == 10975
replace GB15_reelectedW4 = 1 if districtW4 == 10976
replace GB15_reelectedW4 = 1 if districtW4 == 10977
replace GB15_reelectedW4 = 1 if districtW4 == 10978
replace GB15_reelectedW4 = 1 if districtW4 == 10979
replace GB15_reelectedW4 = 1 if districtW4 == 10980
replace GB15_reelectedW4 = 1 if districtW4 == 10981
replace GB15_reelectedW4 = 1 if districtW4 == 10982
replace GB15_reelectedW4 = 1 if districtW4 == 10983
replace GB15_reelectedW4 = 0 if districtW4 == 10984
replace GB15_reelectedW4 = 1 if districtW4 == 10985
replace GB15_reelectedW4 = 1 if districtW4 == 10986
replace GB15_reelectedW4 = 1 if districtW4 == 10987
replace GB15_reelectedW4 = 0 if districtW4 == 10988
replace GB15_reelectedW4 = 0 if districtW4 == 10989
replace GB15_reelectedW4 = 1 if districtW4 == 10990
replace GB15_reelectedW4 = 1 if districtW4 == 10991
replace GB15_reelectedW4 = 1 if districtW4 == 10992
replace GB15_reelectedW4 = 1 if districtW4 == 10993
replace GB15_reelectedW4 = 0 if districtW4 == 10994
replace GB15_reelectedW4 = 1 if districtW4 == 10995
replace GB15_reelectedW4 = 1 if districtW4 == 10996
replace GB15_reelectedW4 = 1 if districtW4 == 10997
replace GB15_reelectedW4 = 1 if districtW4 == 10998
replace GB15_reelectedW4 = 0 if districtW4 == 10999
replace GB15_reelectedW4 = 1 if districtW4 == 11000
replace GB15_reelectedW4 = 1 if districtW4 == 11001
replace GB15_reelectedW4 = 1 if districtW4 == 11002
replace GB15_reelectedW4 = 1 if districtW4 == 11003
replace GB15_reelectedW4 = 1 if districtW4 == 11004
replace GB15_reelectedW4 = 0 if districtW4 == 11005
replace GB15_reelectedW4 = 1 if districtW4 == 11006
replace GB15_reelectedW4 = 1 if districtW4 == 11007
replace GB15_reelectedW4 = 1 if districtW4 == 11008
replace GB15_reelectedW4 = 1 if districtW4 == 11009
replace GB15_reelectedW4 = 1 if districtW4 == 11010
replace GB15_reelectedW4 = 1 if districtW4 == 11011
replace GB15_reelectedW4 = 1 if districtW4 == 11012
replace GB15_reelectedW4 = 0 if districtW4 == 11013
replace GB15_reelectedW4 = 1 if districtW4 == 11014
replace GB15_reelectedW4 = 1 if districtW4 == 11015
replace GB15_reelectedW4 = 1 if districtW4 == 11016
replace GB15_reelectedW4 = 1 if districtW4 == 11017
replace GB15_reelectedW4 = 1 if districtW4 == 11018
replace GB15_reelectedW4 = 1 if districtW4 == 11019
replace GB15_reelectedW4 = 1 if districtW4 == 11020
replace GB15_reelectedW4 = 1 if districtW4 == 11021
replace GB15_reelectedW4 = 1 if districtW4 == 11022
replace GB15_reelectedW4 = 1 if districtW4 == 11023
replace GB15_reelectedW4 = 1 if districtW4 == 11024
replace GB15_reelectedW4 = 1 if districtW4 == 11025
replace GB15_reelectedW4 = 0 if districtW4 == 11026
replace GB15_reelectedW4 = 1 if districtW4 == 11027
replace GB15_reelectedW4 = 1 if districtW4 == 11028
replace GB15_reelectedW4 = 1 if districtW4 == 11029
replace GB15_reelectedW4 = 0 if districtW4 == 11030
replace GB15_reelectedW4 = 1 if districtW4 == 11031
replace GB15_reelectedW4 = 1 if districtW4 == 11032
replace GB15_reelectedW4 = 1 if districtW4 == 11033
replace GB15_reelectedW4 = 1 if districtW4 == 11034
replace GB15_reelectedW4 = 1 if districtW4 == 11035
replace GB15_reelectedW4 = 1 if districtW4 == 11036
replace GB15_reelectedW4 = 1 if districtW4 == 11037
replace GB15_reelectedW4 = 1 if districtW4 == 11038
replace GB15_reelectedW4 = 1 if districtW4 == 11039
replace GB15_reelectedW4 = 1 if districtW4 == 11040
replace GB15_reelectedW4 = 1 if districtW4 == 11041
replace GB15_reelectedW4 = 1 if districtW4 == 11042
replace GB15_reelectedW4 = 1 if districtW4 == 11043
replace GB15_reelectedW4 = 0 if districtW4 == 11044
replace GB15_reelectedW4 = 1 if districtW4 == 11045
replace GB15_reelectedW4 = 1 if districtW4 == 11046
replace GB15_reelectedW4 = 1 if districtW4 == 11047
replace GB15_reelectedW4 = 1 if districtW4 == 11048
replace GB15_reelectedW4 = 1 if districtW4 == 11049
replace GB15_reelectedW4 = 1 if districtW4 == 11050
replace GB15_reelectedW4 = 0 if districtW4 == 11051
replace GB15_reelectedW4 = 1 if districtW4 == 11052
replace GB15_reelectedW4 = 1 if districtW4 == 11053
replace GB15_reelectedW4 = 1 if districtW4 == 11054
replace GB15_reelectedW4 = 1 if districtW4 == 11055
replace GB15_reelectedW4 = 1 if districtW4 == 11056
replace GB15_reelectedW4 = 1 if districtW4 == 11057
replace GB15_reelectedW4 = 1 if districtW4 == 11058
replace GB15_reelectedW4 = 1 if districtW4 == 11059
replace GB15_reelectedW4 = 0 if districtW4 == 11060
replace GB15_reelectedW4 = 0 if districtW4 == 11061
replace GB15_reelectedW4 = 1 if districtW4 == 11062
replace GB15_reelectedW4 = 1 if districtW4 == 40001
replace GB15_reelectedW4 = 1 if districtW4 == 40002
replace GB15_reelectedW4 = 1 if districtW4 == 40003
replace GB15_reelectedW4 = 1 if districtW4 == 40004
replace GB15_reelectedW4 = 1 if districtW4 == 40005
replace GB15_reelectedW4 = 1 if districtW4 == 40006
replace GB15_reelectedW4 = 1 if districtW4 == 40007
replace GB15_reelectedW4 = 1 if districtW4 == 40008
replace GB15_reelectedW4 = 1 if districtW4 == 40009
replace GB15_reelectedW4 = 1 if districtW4 == 40010
replace GB15_reelectedW4 = 1 if districtW4 == 40011
replace GB15_reelectedW4 = 1 if districtW4 == 40012
replace GB15_reelectedW4 = 1 if districtW4 == 40013
replace GB15_reelectedW4 = 1 if districtW4 == 40014
replace GB15_reelectedW4 = 1 if districtW4 == 40015
replace GB15_reelectedW4 = 1 if districtW4 == 40016
replace GB15_reelectedW4 = 1 if districtW4 == 40017
replace GB15_reelectedW4 = 1 if districtW4 == 40018
replace GB15_reelectedW4 = 0 if districtW4 == 20001
replace GB15_reelectedW4 = 0 if districtW4 == 20002
replace GB15_reelectedW4 = 0 if districtW4 == 20003
replace GB15_reelectedW4 = 0 if districtW4 == 20004
replace GB15_reelectedW4 = 0 if districtW4 == 20005
replace GB15_reelectedW4 = 0 if districtW4 == 20006
replace GB15_reelectedW4 = 0 if districtW4 == 20007
replace GB15_reelectedW4 = 0 if districtW4 == 20008
replace GB15_reelectedW4 = 0 if districtW4 == 20009
replace GB15_reelectedW4 = 0 if districtW4 == 20010
replace GB15_reelectedW4 = 0 if districtW4 == 20011
replace GB15_reelectedW4 = 0 if districtW4 == 20012
replace GB15_reelectedW4 = 0 if districtW4 == 20013
replace GB15_reelectedW4 = 1 if districtW4 == 20014
replace GB15_reelectedW4 = 0 if districtW4 == 20015
replace GB15_reelectedW4 = 0 if districtW4 == 20016
replace GB15_reelectedW4 = 0 if districtW4 == 20017
replace GB15_reelectedW4 = 0 if districtW4 == 20018
replace GB15_reelectedW4 = 0 if districtW4 == 20019
replace GB15_reelectedW4 = 0 if districtW4 == 20020
replace GB15_reelectedW4 = 0 if districtW4 == 20021
replace GB15_reelectedW4 = 0 if districtW4 == 20022
replace GB15_reelectedW4 = 0 if districtW4 == 20023
replace GB15_reelectedW4 = 1 if districtW4 == 20024
replace GB15_reelectedW4 = 0 if districtW4 == 20025
replace GB15_reelectedW4 = 0 if districtW4 == 20026
replace GB15_reelectedW4 = 0 if districtW4 == 20027
replace GB15_reelectedW4 = 0 if districtW4 == 20028
replace GB15_reelectedW4 = 0 if districtW4 == 20029
replace GB15_reelectedW4 = 0 if districtW4 == 20030
replace GB15_reelectedW4 = 0 if districtW4 == 20031
replace GB15_reelectedW4 = 0 if districtW4 == 20032
replace GB15_reelectedW4 = 0 if districtW4 == 20033
replace GB15_reelectedW4 = 0 if districtW4 == 20034
replace GB15_reelectedW4 = 0 if districtW4 == 20035
replace GB15_reelectedW4 = 0 if districtW4 == 20036
replace GB15_reelectedW4 = 0 if districtW4 == 20037
replace GB15_reelectedW4 = 0 if districtW4 == 20038
replace GB15_reelectedW4 = 0 if districtW4 == 20039
replace GB15_reelectedW4 = 0 if districtW4 == 20040
replace GB15_reelectedW4 = 0 if districtW4 == 20041
replace GB15_reelectedW4 = 0 if districtW4 == 20042
replace GB15_reelectedW4 = 0 if districtW4 == 20043
replace GB15_reelectedW4 = 0 if districtW4 == 20044
replace GB15_reelectedW4 = 0 if districtW4 == 20045
replace GB15_reelectedW4 = 0 if districtW4 == 20046
replace GB15_reelectedW4 = 0 if districtW4 == 20047
replace GB15_reelectedW4 = 0 if districtW4 == 20048
replace GB15_reelectedW4 = 0 if districtW4 == 20049
replace GB15_reelectedW4 = 0 if districtW4 == 20050
replace GB15_reelectedW4 = 1 if districtW4 == 20051
replace GB15_reelectedW4 = 0 if districtW4 == 20052
replace GB15_reelectedW4 = 0 if districtW4 == 20053
replace GB15_reelectedW4 = 0 if districtW4 == 20054
replace GB15_reelectedW4 = 0 if districtW4 == 20055
replace GB15_reelectedW4 = 0 if districtW4 == 20056
replace GB15_reelectedW4 = 0 if districtW4 == 20057
replace GB15_reelectedW4 = 0 if districtW4 == 20058
replace GB15_reelectedW4 = 0 if districtW4 == 20059
replace GB15_reelectedW4 = 1 if districtW4 == 30041
replace GB15_reelectedW4 = 1 if districtW4 == 30042
replace GB15_reelectedW4 = 1 if districtW4 == 30043
replace GB15_reelectedW4 = 1 if districtW4 == 30044
replace GB15_reelectedW4 = 1 if districtW4 == 30045
replace GB15_reelectedW4 = 0 if districtW4 == 30046
replace GB15_reelectedW4 = 0 if districtW4 == 30047
replace GB15_reelectedW4 = 1 if districtW4 == 30048
replace GB15_reelectedW4 = 1 if districtW4 == 30049
replace GB15_reelectedW4 = 0 if districtW4 == 30050
replace GB15_reelectedW4 = 1 if districtW4 == 30051
replace GB15_reelectedW4 = 1 if districtW4 == 30052
replace GB15_reelectedW4 = 1 if districtW4 == 30053
replace GB15_reelectedW4 = 1 if districtW4 == 30054
replace GB15_reelectedW4 = 1 if districtW4 == 30055
replace GB15_reelectedW4 = 1 if districtW4 == 30056
replace GB15_reelectedW4 = 1 if districtW4 == 30057
replace GB15_reelectedW4 = 1 if districtW4 == 30058
replace GB15_reelectedW4 = 1 if districtW4 == 30059
replace GB15_reelectedW4 = 0 if districtW4 == 30060
replace GB15_reelectedW4 = 1 if districtW4 == 30061
replace GB15_reelectedW4 = 1 if districtW4 == 30062
replace GB15_reelectedW4 = 1 if districtW4 == 30063
replace GB15_reelectedW4 = 1 if districtW4 == 30064
replace GB15_reelectedW4 = 1 if districtW4 == 30065
replace GB15_reelectedW4 = 1 if districtW4 == 30066
replace GB15_reelectedW4 = 1 if districtW4 == 30067
replace GB15_reelectedW4 = 0 if districtW4 == 30068
replace GB15_reelectedW4 = 1 if districtW4 == 30069
replace GB15_reelectedW4 = 1 if districtW4 == 30070
replace GB15_reelectedW4 = 1 if districtW4 == 30071
replace GB15_reelectedW4 = 1 if districtW4 == 30072
replace GB15_reelectedW4 = 1 if districtW4 == 30073
replace GB15_reelectedW4 = 1 if districtW4 == 30074
replace GB15_reelectedW4 = 1 if districtW4 == 30075
replace GB15_reelectedW4 = 1 if districtW4 == 30076
replace GB15_reelectedW4 = 0 if districtW4 == 30077
replace GB15_reelectedW4 = 1 if districtW4 == 30078
replace GB15_reelectedW4 = 1 if districtW4 == 30079
replace GB15_reelectedW4 = 0 if districtW4 == 30080

gen GB15_reelectedW5 = .

replace GB15_reelectedW5 = 1 if districtW5 == 10530
replace GB15_reelectedW5 = 1 if districtW5 == 10531
replace GB15_reelectedW5 = 1 if districtW5 == 10532
replace GB15_reelectedW5 = 1 if districtW5 == 10533
replace GB15_reelectedW5 = 1 if districtW5 == 10534
replace GB15_reelectedW5 = 1 if districtW5 == 10535
replace GB15_reelectedW5 = 1 if districtW5 == 10536
replace GB15_reelectedW5 = 1 if districtW5 == 10537
replace GB15_reelectedW5 = 1 if districtW5 == 10538
replace GB15_reelectedW5 = 1 if districtW5 == 10539
replace GB15_reelectedW5 = 1 if districtW5 == 10540
replace GB15_reelectedW5 = 1 if districtW5 == 10541
replace GB15_reelectedW5 = 1 if districtW5 == 10542
replace GB15_reelectedW5 = 0 if districtW5 == 10543
replace GB15_reelectedW5 = 1 if districtW5 == 10544
replace GB15_reelectedW5 = 1 if districtW5 == 10545
replace GB15_reelectedW5 = 1 if districtW5 == 10546
replace GB15_reelectedW5 = 0 if districtW5 == 10547
replace GB15_reelectedW5 = 1 if districtW5 == 10548
replace GB15_reelectedW5 = 1 if districtW5 == 10549
replace GB15_reelectedW5 = 1 if districtW5 == 10550
replace GB15_reelectedW5 = 1 if districtW5 == 10551
replace GB15_reelectedW5 = 1 if districtW5 == 10552
replace GB15_reelectedW5 = 0 if districtW5 == 10553
replace GB15_reelectedW5 = 0 if districtW5 == 10554
replace GB15_reelectedW5 = 1 if districtW5 == 10555
replace GB15_reelectedW5 = 1 if districtW5 == 10556
replace GB15_reelectedW5 = 1 if districtW5 == 10557
replace GB15_reelectedW5 = 1 if districtW5 == 10558
replace GB15_reelectedW5 = 1 if districtW5 == 10559
replace GB15_reelectedW5 = 1 if districtW5 == 10560
replace GB15_reelectedW5 = 1 if districtW5 == 10561
replace GB15_reelectedW5 = 1 if districtW5 == 10562
replace GB15_reelectedW5 = 1 if districtW5 == 10563
replace GB15_reelectedW5 = 1 if districtW5 == 10564
replace GB15_reelectedW5 = 1 if districtW5 == 10565
replace GB15_reelectedW5 = 1 if districtW5 == 10566
replace GB15_reelectedW5 = 1 if districtW5 == 10567
replace GB15_reelectedW5 = 0 if districtW5 == 10568
replace GB15_reelectedW5 = 1 if districtW5 == 10569
replace GB15_reelectedW5 = 1 if districtW5 == 10570
replace GB15_reelectedW5 = 1 if districtW5 == 10571
replace GB15_reelectedW5 = 1 if districtW5 == 10572
replace GB15_reelectedW5 = 1 if districtW5 == 10573
replace GB15_reelectedW5 = 1 if districtW5 == 10574
replace GB15_reelectedW5 = 1 if districtW5 == 10575
replace GB15_reelectedW5 = 1 if districtW5 == 10576
replace GB15_reelectedW5 = 1 if districtW5 == 10577
replace GB15_reelectedW5 = 1 if districtW5 == 10578
replace GB15_reelectedW5 = 1 if districtW5 == 10579
replace GB15_reelectedW5 = 0 if districtW5 == 10580
replace GB15_reelectedW5 = 1 if districtW5 == 10581
replace GB15_reelectedW5 = 1 if districtW5 == 10582
replace GB15_reelectedW5 = 1 if districtW5 == 10583
replace GB15_reelectedW5 = 1 if districtW5 == 10584
replace GB15_reelectedW5 = 1 if districtW5 == 10585
replace GB15_reelectedW5 = 1 if districtW5 == 10586
replace GB15_reelectedW5 = 0 if districtW5 == 10587
replace GB15_reelectedW5 = 1 if districtW5 == 10588
replace GB15_reelectedW5 = 1 if districtW5 == 10589
replace GB15_reelectedW5 = 1 if districtW5 == 10590
replace GB15_reelectedW5 = 0 if districtW5 == 10591
replace GB15_reelectedW5 = 1 if districtW5 == 10592
replace GB15_reelectedW5 = 0 if districtW5 == 10593
replace GB15_reelectedW5 = 1 if districtW5 == 10594
replace GB15_reelectedW5 = 1 if districtW5 == 10595
replace GB15_reelectedW5 = 1 if districtW5 == 10596
replace GB15_reelectedW5 = 1 if districtW5 == 10597
replace GB15_reelectedW5 = 1 if districtW5 == 10598
replace GB15_reelectedW5 = 1 if districtW5 == 10599
replace GB15_reelectedW5 = 1 if districtW5 == 10600
replace GB15_reelectedW5 = 1 if districtW5 == 10601
replace GB15_reelectedW5 = 0 if districtW5 == 10602
replace GB15_reelectedW5 = 1 if districtW5 == 10603
replace GB15_reelectedW5 = 1 if districtW5 == 10604
replace GB15_reelectedW5 = 1 if districtW5 == 10605
replace GB15_reelectedW5 = 1 if districtW5 == 10606
replace GB15_reelectedW5 = 1 if districtW5 == 10607
replace GB15_reelectedW5 = 1 if districtW5 == 10608
replace GB15_reelectedW5 = 0 if districtW5 == 10609
replace GB15_reelectedW5 = 1 if districtW5 == 10610
replace GB15_reelectedW5 = 1 if districtW5 == 10611
replace GB15_reelectedW5 = 1 if districtW5 == 10612
replace GB15_reelectedW5 = 1 if districtW5 == 10613
replace GB15_reelectedW5 = 1 if districtW5 == 10614
replace GB15_reelectedW5 = 1 if districtW5 == 10615
replace GB15_reelectedW5 = 1 if districtW5 == 10616
replace GB15_reelectedW5 = 0 if districtW5 == 10617
replace GB15_reelectedW5 = 1 if districtW5 == 10618
replace GB15_reelectedW5 = 1 if districtW5 == 10619
replace GB15_reelectedW5 = 1 if districtW5 == 10620
replace GB15_reelectedW5 = 1 if districtW5 == 10621
replace GB15_reelectedW5 = 1 if districtW5 == 10622
replace GB15_reelectedW5 = 1 if districtW5 == 10623
replace GB15_reelectedW5 = 1 if districtW5 == 10624
replace GB15_reelectedW5 = 1 if districtW5 == 10625
replace GB15_reelectedW5 = 1 if districtW5 == 10626
replace GB15_reelectedW5 = 0 if districtW5 == 10627
replace GB15_reelectedW5 = 1 if districtW5 == 10628
replace GB15_reelectedW5 = 1 if districtW5 == 10629
replace GB15_reelectedW5 = 0 if districtW5 == 10630
replace GB15_reelectedW5 = 1 if districtW5 == 10631
replace GB15_reelectedW5 = 1 if districtW5 == 10632
replace GB15_reelectedW5 = 1 if districtW5 == 10633
replace GB15_reelectedW5 = 1 if districtW5 == 10634
replace GB15_reelectedW5 = 0 if districtW5 == 10635
replace GB15_reelectedW5 = 1 if districtW5 == 10636
replace GB15_reelectedW5 = 1 if districtW5 == 10637
replace GB15_reelectedW5 = 1 if districtW5 == 10638
replace GB15_reelectedW5 = 1 if districtW5 == 10639
replace GB15_reelectedW5 = 0 if districtW5 == 10640
replace GB15_reelectedW5 = 1 if districtW5 == 10641
replace GB15_reelectedW5 = 0 if districtW5 == 10642
replace GB15_reelectedW5 = 1 if districtW5 == 10643
replace GB15_reelectedW5 = 0 if districtW5 == 10644
replace GB15_reelectedW5 = 1 if districtW5 == 10645
replace GB15_reelectedW5 = 1 if districtW5 == 10646
replace GB15_reelectedW5 = 1 if districtW5 == 10647
replace GB15_reelectedW5 = 1 if districtW5 == 10648
replace GB15_reelectedW5 = 1 if districtW5 == 10649
replace GB15_reelectedW5 = 1 if districtW5 == 10650
replace GB15_reelectedW5 = 1 if districtW5 == 10651
replace GB15_reelectedW5 = 1 if districtW5 == 10652
replace GB15_reelectedW5 = 1 if districtW5 == 10653
replace GB15_reelectedW5 = 1 if districtW5 == 10654
replace GB15_reelectedW5 = 0 if districtW5 == 10655
replace GB15_reelectedW5 = 1 if districtW5 == 10656
replace GB15_reelectedW5 = 1 if districtW5 == 10657
replace GB15_reelectedW5 = 1 if districtW5 == 10658
replace GB15_reelectedW5 = 1 if districtW5 == 10659
replace GB15_reelectedW5 = 1 if districtW5 == 10660
replace GB15_reelectedW5 = 1 if districtW5 == 10661
replace GB15_reelectedW5 = 0 if districtW5 == 10662
replace GB15_reelectedW5 = 1 if districtW5 == 10663
replace GB15_reelectedW5 = 1 if districtW5 == 10664
replace GB15_reelectedW5 = 1 if districtW5 == 10665
replace GB15_reelectedW5 = 0 if districtW5 == 10666
replace GB15_reelectedW5 = 1 if districtW5 == 10667
replace GB15_reelectedW5 = 1 if districtW5 == 10668
replace GB15_reelectedW5 = 1 if districtW5 == 10669
replace GB15_reelectedW5 = 1 if districtW5 == 10670
replace GB15_reelectedW5 = 1 if districtW5 == 10671
replace GB15_reelectedW5 = 1 if districtW5 == 10672
replace GB15_reelectedW5 = 1 if districtW5 == 10673
replace GB15_reelectedW5 = 0 if districtW5 == 10674
replace GB15_reelectedW5 = 1 if districtW5 == 10675
replace GB15_reelectedW5 = 1 if districtW5 == 10676
replace GB15_reelectedW5 = 1 if districtW5 == 10677
replace GB15_reelectedW5 = 1 if districtW5 == 10678
replace GB15_reelectedW5 = 1 if districtW5 == 10679
replace GB15_reelectedW5 = 1 if districtW5 == 10680
replace GB15_reelectedW5 = 1 if districtW5 == 10681
replace GB15_reelectedW5 = 1 if districtW5 == 10682
replace GB15_reelectedW5 = 1 if districtW5 == 10683
replace GB15_reelectedW5 = 0 if districtW5 == 10684
replace GB15_reelectedW5 = 0 if districtW5 == 10685
replace GB15_reelectedW5 = 1 if districtW5 == 10686
replace GB15_reelectedW5 = 0 if districtW5 == 10687
replace GB15_reelectedW5 = 1 if districtW5 == 10688
replace GB15_reelectedW5 = 1 if districtW5 == 10689
replace GB15_reelectedW5 = 1 if districtW5 == 10690
replace GB15_reelectedW5 = 0 if districtW5 == 10691
replace GB15_reelectedW5 = 1 if districtW5 == 10692
replace GB15_reelectedW5 = 1 if districtW5 == 10693
replace GB15_reelectedW5 = 1 if districtW5 == 10694
replace GB15_reelectedW5 = 1 if districtW5 == 10695
replace GB15_reelectedW5 = 1 if districtW5 == 10696
replace GB15_reelectedW5 = 1 if districtW5 == 10697
replace GB15_reelectedW5 = 1 if districtW5 == 10698
replace GB15_reelectedW5 = 1 if districtW5 == 10699
replace GB15_reelectedW5 = 1 if districtW5 == 10700
replace GB15_reelectedW5 = 0 if districtW5 == 10701
replace GB15_reelectedW5 = 1 if districtW5 == 10702
replace GB15_reelectedW5 = 1 if districtW5 == 10703
replace GB15_reelectedW5 = 1 if districtW5 == 10704
replace GB15_reelectedW5 = 1 if districtW5 == 10705
replace GB15_reelectedW5 = 1 if districtW5 == 10706
replace GB15_reelectedW5 = 1 if districtW5 == 10707
replace GB15_reelectedW5 = 1 if districtW5 == 10708
replace GB15_reelectedW5 = 1 if districtW5 == 10709
replace GB15_reelectedW5 = 1 if districtW5 == 10710
replace GB15_reelectedW5 = 1 if districtW5 == 10711
replace GB15_reelectedW5 = 1 if districtW5 == 10712
replace GB15_reelectedW5 = 1 if districtW5 == 10713
replace GB15_reelectedW5 = 1 if districtW5 == 10714
replace GB15_reelectedW5 = 1 if districtW5 == 10715
replace GB15_reelectedW5 = 1 if districtW5 == 10716
replace GB15_reelectedW5 = 1 if districtW5 == 10717
replace GB15_reelectedW5 = 1 if districtW5 == 10718
replace GB15_reelectedW5 = 1 if districtW5 == 10719
replace GB15_reelectedW5 = 1 if districtW5 == 10720
replace GB15_reelectedW5 = 0 if districtW5 == 10721
replace GB15_reelectedW5 = 1 if districtW5 == 10722
replace GB15_reelectedW5 = 1 if districtW5 == 10723
replace GB15_reelectedW5 = 1 if districtW5 == 10724
replace GB15_reelectedW5 = 1 if districtW5 == 10725
replace GB15_reelectedW5 = 1 if districtW5 == 10726
replace GB15_reelectedW5 = 1 if districtW5 == 10727
replace GB15_reelectedW5 = 1 if districtW5 == 10728
replace GB15_reelectedW5 = 1 if districtW5 == 10729
replace GB15_reelectedW5 = 1 if districtW5 == 10730
replace GB15_reelectedW5 = 1 if districtW5 == 10731
replace GB15_reelectedW5 = 0 if districtW5 == 10732
replace GB15_reelectedW5 = 1 if districtW5 == 10733
replace GB15_reelectedW5 = 1 if districtW5 == 10734
replace GB15_reelectedW5 = 1 if districtW5 == 10735
replace GB15_reelectedW5 = 1 if districtW5 == 10736
replace GB15_reelectedW5 = 1 if districtW5 == 10737
replace GB15_reelectedW5 = 0 if districtW5 == 10738
replace GB15_reelectedW5 = 1 if districtW5 == 10739
replace GB15_reelectedW5 = 1 if districtW5 == 10740
replace GB15_reelectedW5 = 1 if districtW5 == 10741
replace GB15_reelectedW5 = 1 if districtW5 == 10742
replace GB15_reelectedW5 = 1 if districtW5 == 10743
replace GB15_reelectedW5 = 1 if districtW5 == 10744
replace GB15_reelectedW5 = 1 if districtW5 == 10745
replace GB15_reelectedW5 = 1 if districtW5 == 10746
replace GB15_reelectedW5 = 1 if districtW5 == 10747
replace GB15_reelectedW5 = 1 if districtW5 == 10748
replace GB15_reelectedW5 = 1 if districtW5 == 10749
replace GB15_reelectedW5 = 1 if districtW5 == 10750
replace GB15_reelectedW5 = 1 if districtW5 == 10751
replace GB15_reelectedW5 = 0 if districtW5 == 10752
replace GB15_reelectedW5 = 1 if districtW5 == 10753
replace GB15_reelectedW5 = 1 if districtW5 == 10754
replace GB15_reelectedW5 = 0 if districtW5 == 10755
replace GB15_reelectedW5 = 0 if districtW5 == 10756
replace GB15_reelectedW5 = 1 if districtW5 == 10757
replace GB15_reelectedW5 = 1 if districtW5 == 10758
replace GB15_reelectedW5 = 0 if districtW5 == 10759
replace GB15_reelectedW5 = 0 if districtW5 == 10760
replace GB15_reelectedW5 = 1 if districtW5 == 10761
replace GB15_reelectedW5 = 1 if districtW5 == 10762
replace GB15_reelectedW5 = 1 if districtW5 == 10763
replace GB15_reelectedW5 = 1 if districtW5 == 10764
replace GB15_reelectedW5 = 1 if districtW5 == 10765
replace GB15_reelectedW5 = 1 if districtW5 == 10766
replace GB15_reelectedW5 = 1 if districtW5 == 10767
replace GB15_reelectedW5 = 1 if districtW5 == 10768
replace GB15_reelectedW5 = 1 if districtW5 == 10769
replace GB15_reelectedW5 = 0 if districtW5 == 10770
replace GB15_reelectedW5 = 1 if districtW5 == 10771
replace GB15_reelectedW5 = 1 if districtW5 == 10772
replace GB15_reelectedW5 = 1 if districtW5 == 10773
replace GB15_reelectedW5 = 1 if districtW5 == 10774
replace GB15_reelectedW5 = 1 if districtW5 == 10775
replace GB15_reelectedW5 = 0 if districtW5 == 10776
replace GB15_reelectedW5 = 1 if districtW5 == 10777
replace GB15_reelectedW5 = 1 if districtW5 == 10778
replace GB15_reelectedW5 = 1 if districtW5 == 10779
replace GB15_reelectedW5 = 1 if districtW5 == 10780
replace GB15_reelectedW5 = 1 if districtW5 == 10781
replace GB15_reelectedW5 = 1 if districtW5 == 10782
replace GB15_reelectedW5 = 0 if districtW5 == 10783
replace GB15_reelectedW5 = 1 if districtW5 == 10784
replace GB15_reelectedW5 = 1 if districtW5 == 10785
replace GB15_reelectedW5 = 0 if districtW5 == 10786
replace GB15_reelectedW5 = 1 if districtW5 == 10787
replace GB15_reelectedW5 = 1 if districtW5 == 10788
replace GB15_reelectedW5 = 1 if districtW5 == 10789
replace GB15_reelectedW5 = 1 if districtW5 == 10790
replace GB15_reelectedW5 = 1 if districtW5 == 10791
replace GB15_reelectedW5 = 1 if districtW5 == 10792
replace GB15_reelectedW5 = 0 if districtW5 == 10793
replace GB15_reelectedW5 = 1 if districtW5 == 10794
replace GB15_reelectedW5 = 0 if districtW5 == 10795
replace GB15_reelectedW5 = 0 if districtW5 == 10796
replace GB15_reelectedW5 = 1 if districtW5 == 10797
replace GB15_reelectedW5 = 1 if districtW5 == 10798
replace GB15_reelectedW5 = 1 if districtW5 == 10799
replace GB15_reelectedW5 = 1 if districtW5 == 10800
replace GB15_reelectedW5 = 0 if districtW5 == 10801
replace GB15_reelectedW5 = 1 if districtW5 == 10802
replace GB15_reelectedW5 = 1 if districtW5 == 10803
replace GB15_reelectedW5 = 1 if districtW5 == 10804
replace GB15_reelectedW5 = 1 if districtW5 == 10805
replace GB15_reelectedW5 = 1 if districtW5 == 10806
replace GB15_reelectedW5 = 0 if districtW5 == 10807
replace GB15_reelectedW5 = 1 if districtW5 == 10808
replace GB15_reelectedW5 = 0 if districtW5 == 10809
replace GB15_reelectedW5 = 1 if districtW5 == 10810
replace GB15_reelectedW5 = 1 if districtW5 == 10811
replace GB15_reelectedW5 = 1 if districtW5 == 10812
replace GB15_reelectedW5 = 1 if districtW5 == 10813
replace GB15_reelectedW5 = 1 if districtW5 == 10814
replace GB15_reelectedW5 = 0 if districtW5 == 10815
replace GB15_reelectedW5 = 1 if districtW5 == 10816
replace GB15_reelectedW5 = 1 if districtW5 == 10817
replace GB15_reelectedW5 = 1 if districtW5 == 10818
replace GB15_reelectedW5 = 1 if districtW5 == 10819
replace GB15_reelectedW5 = 1 if districtW5 == 10820
replace GB15_reelectedW5 = 1 if districtW5 == 10821
replace GB15_reelectedW5 = 1 if districtW5 == 10822
replace GB15_reelectedW5 = 1 if districtW5 == 10823
replace GB15_reelectedW5 = 1 if districtW5 == 10824
replace GB15_reelectedW5 = 1 if districtW5 == 10825
replace GB15_reelectedW5 = 0 if districtW5 == 10826
replace GB15_reelectedW5 = 1 if districtW5 == 10827
replace GB15_reelectedW5 = 1 if districtW5 == 10828
replace GB15_reelectedW5 = 1 if districtW5 == 10829
replace GB15_reelectedW5 = 1 if districtW5 == 10830
replace GB15_reelectedW5 = 1 if districtW5 == 10831
replace GB15_reelectedW5 = 1 if districtW5 == 10832
replace GB15_reelectedW5 = 1 if districtW5 == 10833
replace GB15_reelectedW5 = 1 if districtW5 == 10834
replace GB15_reelectedW5 = 1 if districtW5 == 10835
replace GB15_reelectedW5 = 1 if districtW5 == 10836
replace GB15_reelectedW5 = 0 if districtW5 == 10837
replace GB15_reelectedW5 = 0 if districtW5 == 10838
replace GB15_reelectedW5 = 1 if districtW5 == 10839
replace GB15_reelectedW5 = 1 if districtW5 == 10840
replace GB15_reelectedW5 = 1 if districtW5 == 10841
replace GB15_reelectedW5 = 1 if districtW5 == 10842
replace GB15_reelectedW5 = 1 if districtW5 == 10843
replace GB15_reelectedW5 = 1 if districtW5 == 10844
replace GB15_reelectedW5 = 1 if districtW5 == 10845
replace GB15_reelectedW5 = 1 if districtW5 == 10846
replace GB15_reelectedW5 = 1 if districtW5 == 10847
replace GB15_reelectedW5 = 1 if districtW5 == 10848
replace GB15_reelectedW5 = 1 if districtW5 == 10849
replace GB15_reelectedW5 = 1 if districtW5 == 10850
replace GB15_reelectedW5 = 1 if districtW5 == 10851
replace GB15_reelectedW5 = 1 if districtW5 == 10852
replace GB15_reelectedW5 = 1 if districtW5 == 10853
replace GB15_reelectedW5 = 1 if districtW5 == 10854
replace GB15_reelectedW5 = 1 if districtW5 == 10855
replace GB15_reelectedW5 = 1 if districtW5 == 10856
replace GB15_reelectedW5 = 1 if districtW5 == 10857
replace GB15_reelectedW5 = 1 if districtW5 == 10858
replace GB15_reelectedW5 = 1 if districtW5 == 10859
replace GB15_reelectedW5 = 1 if districtW5 == 10860
replace GB15_reelectedW5 = 1 if districtW5 == 10861
replace GB15_reelectedW5 = 1 if districtW5 == 10862
replace GB15_reelectedW5 = 1 if districtW5 == 10863
replace GB15_reelectedW5 = 0 if districtW5 == 10864
replace GB15_reelectedW5 = 0 if districtW5 == 10865
replace GB15_reelectedW5 = 1 if districtW5 == 10866
replace GB15_reelectedW5 = 1 if districtW5 == 10867
replace GB15_reelectedW5 = 1 if districtW5 == 10868
replace GB15_reelectedW5 = 1 if districtW5 == 10869
replace GB15_reelectedW5 = 1 if districtW5 == 10870
replace GB15_reelectedW5 = 1 if districtW5 == 10871
replace GB15_reelectedW5 = 1 if districtW5 == 10872
replace GB15_reelectedW5 = 1 if districtW5 == 10873
replace GB15_reelectedW5 = 1 if districtW5 == 10874
replace GB15_reelectedW5 = 1 if districtW5 == 10875
replace GB15_reelectedW5 = 1 if districtW5 == 10876
replace GB15_reelectedW5 = 1 if districtW5 == 10877
replace GB15_reelectedW5 = 1 if districtW5 == 10878
replace GB15_reelectedW5 = 0 if districtW5 == 10879
replace GB15_reelectedW5 = 1 if districtW5 == 10880
replace GB15_reelectedW5 = 1 if districtW5 == 10881
replace GB15_reelectedW5 = 1 if districtW5 == 10882
replace GB15_reelectedW5 = 1 if districtW5 == 10883
replace GB15_reelectedW5 = 0 if districtW5 == 10884
replace GB15_reelectedW5 = 0 if districtW5 == 10885
replace GB15_reelectedW5 = 1 if districtW5 == 10886
replace GB15_reelectedW5 = 1 if districtW5 == 10887
replace GB15_reelectedW5 = 1 if districtW5 == 10888
replace GB15_reelectedW5 = 1 if districtW5 == 10889
replace GB15_reelectedW5 = 1 if districtW5 == 10890
replace GB15_reelectedW5 = 0 if districtW5 == 10891
replace GB15_reelectedW5 = 1 if districtW5 == 10892
replace GB15_reelectedW5 = 1 if districtW5 == 10893
replace GB15_reelectedW5 = 1 if districtW5 == 10894
replace GB15_reelectedW5 = 1 if districtW5 == 10895
replace GB15_reelectedW5 = 1 if districtW5 == 10896
replace GB15_reelectedW5 = 1 if districtW5 == 10897
replace GB15_reelectedW5 = 1 if districtW5 == 10898
replace GB15_reelectedW5 = 1 if districtW5 == 10899
replace GB15_reelectedW5 = 1 if districtW5 == 10900
replace GB15_reelectedW5 = 1 if districtW5 == 10901
replace GB15_reelectedW5 = 1 if districtW5 == 10902
replace GB15_reelectedW5 = 1 if districtW5 == 10903
replace GB15_reelectedW5 = 1 if districtW5 == 10904
replace GB15_reelectedW5 = 1 if districtW5 == 10905
replace GB15_reelectedW5 = 1 if districtW5 == 10906
replace GB15_reelectedW5 = 1 if districtW5 == 10907
replace GB15_reelectedW5 = 1 if districtW5 == 10908
replace GB15_reelectedW5 = 1 if districtW5 == 10909
replace GB15_reelectedW5 = 1 if districtW5 == 10910
replace GB15_reelectedW5 = 1 if districtW5 == 10911
replace GB15_reelectedW5 = 1 if districtW5 == 10912
replace GB15_reelectedW5 = 1 if districtW5 == 10913
replace GB15_reelectedW5 = 1 if districtW5 == 10914
replace GB15_reelectedW5 = 1 if districtW5 == 10915
replace GB15_reelectedW5 = 1 if districtW5 == 10916
replace GB15_reelectedW5 = 1 if districtW5 == 10917
replace GB15_reelectedW5 = 1 if districtW5 == 10918
replace GB15_reelectedW5 = 1 if districtW5 == 10919
replace GB15_reelectedW5 = 1 if districtW5 == 10920
replace GB15_reelectedW5 = 1 if districtW5 == 10921
replace GB15_reelectedW5 = 1 if districtW5 == 10922
replace GB15_reelectedW5 = 1 if districtW5 == 10923
replace GB15_reelectedW5 = 1 if districtW5 == 10924
replace GB15_reelectedW5 = 1 if districtW5 == 10925
replace GB15_reelectedW5 = 1 if districtW5 == 10926
replace GB15_reelectedW5 = 1 if districtW5 == 10927
replace GB15_reelectedW5 = 1 if districtW5 == 10928
replace GB15_reelectedW5 = 1 if districtW5 == 10929
replace GB15_reelectedW5 = 1 if districtW5 == 10930
replace GB15_reelectedW5 = 0 if districtW5 == 10931
replace GB15_reelectedW5 = 0 if districtW5 == 10932
replace GB15_reelectedW5 = 1 if districtW5 == 10933
replace GB15_reelectedW5 = 1 if districtW5 == 10934
replace GB15_reelectedW5 = 1 if districtW5 == 10935
replace GB15_reelectedW5 = 1 if districtW5 == 10936
replace GB15_reelectedW5 = 1 if districtW5 == 10937
replace GB15_reelectedW5 = 1 if districtW5 == 10938
replace GB15_reelectedW5 = 1 if districtW5 == 10939
replace GB15_reelectedW5 = 1 if districtW5 == 10940
replace GB15_reelectedW5 = 1 if districtW5 == 10941
replace GB15_reelectedW5 = 1 if districtW5 == 10942
replace GB15_reelectedW5 = 1 if districtW5 == 10943
replace GB15_reelectedW5 = 1 if districtW5 == 10944
replace GB15_reelectedW5 = 1 if districtW5 == 10945
replace GB15_reelectedW5 = 1 if districtW5 == 10946
replace GB15_reelectedW5 = 1 if districtW5 == 10947
replace GB15_reelectedW5 = 1 if districtW5 == 10948
replace GB15_reelectedW5 = 1 if districtW5 == 10949
replace GB15_reelectedW5 = 1 if districtW5 == 10950
replace GB15_reelectedW5 = 1 if districtW5 == 10951
replace GB15_reelectedW5 = 1 if districtW5 == 10952
replace GB15_reelectedW5 = 1 if districtW5 == 10953
replace GB15_reelectedW5 = 1 if districtW5 == 10954
replace GB15_reelectedW5 = 0 if districtW5 == 10955
replace GB15_reelectedW5 = 1 if districtW5 == 10956
replace GB15_reelectedW5 = 1 if districtW5 == 10957
replace GB15_reelectedW5 = 1 if districtW5 == 10958
replace GB15_reelectedW5 = 1 if districtW5 == 10959
replace GB15_reelectedW5 = 1 if districtW5 == 10960
replace GB15_reelectedW5 = 0 if districtW5 == 10961
replace GB15_reelectedW5 = 1 if districtW5 == 10962
replace GB15_reelectedW5 = 1 if districtW5 == 10963
replace GB15_reelectedW5 = 0 if districtW5 == 10964
replace GB15_reelectedW5 = 1 if districtW5 == 10965
replace GB15_reelectedW5 = 1 if districtW5 == 10966
replace GB15_reelectedW5 = 0 if districtW5 == 10967
replace GB15_reelectedW5 = 1 if districtW5 == 10968
replace GB15_reelectedW5 = 1 if districtW5 == 10969
replace GB15_reelectedW5 = 1 if districtW5 == 10970
replace GB15_reelectedW5 = 1 if districtW5 == 10971
replace GB15_reelectedW5 = 1 if districtW5 == 10972
replace GB15_reelectedW5 = 1 if districtW5 == 10973
replace GB15_reelectedW5 = 1 if districtW5 == 10974
replace GB15_reelectedW5 = 1 if districtW5 == 10975
replace GB15_reelectedW5 = 1 if districtW5 == 10976
replace GB15_reelectedW5 = 1 if districtW5 == 10977
replace GB15_reelectedW5 = 1 if districtW5 == 10978
replace GB15_reelectedW5 = 1 if districtW5 == 10979
replace GB15_reelectedW5 = 1 if districtW5 == 10980
replace GB15_reelectedW5 = 1 if districtW5 == 10981
replace GB15_reelectedW5 = 1 if districtW5 == 10982
replace GB15_reelectedW5 = 1 if districtW5 == 10983
replace GB15_reelectedW5 = 0 if districtW5 == 10984
replace GB15_reelectedW5 = 1 if districtW5 == 10985
replace GB15_reelectedW5 = 1 if districtW5 == 10986
replace GB15_reelectedW5 = 1 if districtW5 == 10987
replace GB15_reelectedW5 = 0 if districtW5 == 10988
replace GB15_reelectedW5 = 0 if districtW5 == 10989
replace GB15_reelectedW5 = 1 if districtW5 == 10990
replace GB15_reelectedW5 = 1 if districtW5 == 10991
replace GB15_reelectedW5 = 1 if districtW5 == 10992
replace GB15_reelectedW5 = 1 if districtW5 == 10993
replace GB15_reelectedW5 = 0 if districtW5 == 10994
replace GB15_reelectedW5 = 1 if districtW5 == 10995
replace GB15_reelectedW5 = 1 if districtW5 == 10996
replace GB15_reelectedW5 = 1 if districtW5 == 10997
replace GB15_reelectedW5 = 1 if districtW5 == 10998
replace GB15_reelectedW5 = 0 if districtW5 == 10999
replace GB15_reelectedW5 = 1 if districtW5 == 11000
replace GB15_reelectedW5 = 1 if districtW5 == 11001
replace GB15_reelectedW5 = 1 if districtW5 == 11002
replace GB15_reelectedW5 = 1 if districtW5 == 11003
replace GB15_reelectedW5 = 1 if districtW5 == 11004
replace GB15_reelectedW5 = 0 if districtW5 == 11005
replace GB15_reelectedW5 = 1 if districtW5 == 11006
replace GB15_reelectedW5 = 1 if districtW5 == 11007
replace GB15_reelectedW5 = 1 if districtW5 == 11008
replace GB15_reelectedW5 = 1 if districtW5 == 11009
replace GB15_reelectedW5 = 1 if districtW5 == 11010
replace GB15_reelectedW5 = 1 if districtW5 == 11011
replace GB15_reelectedW5 = 1 if districtW5 == 11012
replace GB15_reelectedW5 = 0 if districtW5 == 11013
replace GB15_reelectedW5 = 1 if districtW5 == 11014
replace GB15_reelectedW5 = 1 if districtW5 == 11015
replace GB15_reelectedW5 = 1 if districtW5 == 11016
replace GB15_reelectedW5 = 1 if districtW5 == 11017
replace GB15_reelectedW5 = 1 if districtW5 == 11018
replace GB15_reelectedW5 = 1 if districtW5 == 11019
replace GB15_reelectedW5 = 1 if districtW5 == 11020
replace GB15_reelectedW5 = 1 if districtW5 == 11021
replace GB15_reelectedW5 = 1 if districtW5 == 11022
replace GB15_reelectedW5 = 1 if districtW5 == 11023
replace GB15_reelectedW5 = 1 if districtW5 == 11024
replace GB15_reelectedW5 = 1 if districtW5 == 11025
replace GB15_reelectedW5 = 0 if districtW5 == 11026
replace GB15_reelectedW5 = 1 if districtW5 == 11027
replace GB15_reelectedW5 = 1 if districtW5 == 11028
replace GB15_reelectedW5 = 1 if districtW5 == 11029
replace GB15_reelectedW5 = 0 if districtW5 == 11030
replace GB15_reelectedW5 = 1 if districtW5 == 11031
replace GB15_reelectedW5 = 1 if districtW5 == 11032
replace GB15_reelectedW5 = 1 if districtW5 == 11033
replace GB15_reelectedW5 = 1 if districtW5 == 11034
replace GB15_reelectedW5 = 1 if districtW5 == 11035
replace GB15_reelectedW5 = 1 if districtW5 == 11036
replace GB15_reelectedW5 = 1 if districtW5 == 11037
replace GB15_reelectedW5 = 1 if districtW5 == 11038
replace GB15_reelectedW5 = 1 if districtW5 == 11039
replace GB15_reelectedW5 = 1 if districtW5 == 11040
replace GB15_reelectedW5 = 1 if districtW5 == 11041
replace GB15_reelectedW5 = 1 if districtW5 == 11042
replace GB15_reelectedW5 = 1 if districtW5 == 11043
replace GB15_reelectedW5 = 0 if districtW5 == 11044
replace GB15_reelectedW5 = 1 if districtW5 == 11045
replace GB15_reelectedW5 = 1 if districtW5 == 11046
replace GB15_reelectedW5 = 1 if districtW5 == 11047
replace GB15_reelectedW5 = 1 if districtW5 == 11048
replace GB15_reelectedW5 = 1 if districtW5 == 11049
replace GB15_reelectedW5 = 1 if districtW5 == 11050
replace GB15_reelectedW5 = 0 if districtW5 == 11051
replace GB15_reelectedW5 = 1 if districtW5 == 11052
replace GB15_reelectedW5 = 1 if districtW5 == 11053
replace GB15_reelectedW5 = 1 if districtW5 == 11054
replace GB15_reelectedW5 = 1 if districtW5 == 11055
replace GB15_reelectedW5 = 1 if districtW5 == 11056
replace GB15_reelectedW5 = 1 if districtW5 == 11057
replace GB15_reelectedW5 = 1 if districtW5 == 11058
replace GB15_reelectedW5 = 1 if districtW5 == 11059
replace GB15_reelectedW5 = 0 if districtW5 == 11060
replace GB15_reelectedW5 = 0 if districtW5 == 11061
replace GB15_reelectedW5 = 1 if districtW5 == 11062
replace GB15_reelectedW5 = 1 if districtW5 == 40001
replace GB15_reelectedW5 = 1 if districtW5 == 40002
replace GB15_reelectedW5 = 1 if districtW5 == 40003
replace GB15_reelectedW5 = 1 if districtW5 == 40004
replace GB15_reelectedW5 = 1 if districtW5 == 40005
replace GB15_reelectedW5 = 1 if districtW5 == 40006
replace GB15_reelectedW5 = 1 if districtW5 == 40007
replace GB15_reelectedW5 = 1 if districtW5 == 40008
replace GB15_reelectedW5 = 1 if districtW5 == 40009
replace GB15_reelectedW5 = 1 if districtW5 == 40010
replace GB15_reelectedW5 = 1 if districtW5 == 40011
replace GB15_reelectedW5 = 1 if districtW5 == 40012
replace GB15_reelectedW5 = 1 if districtW5 == 40013
replace GB15_reelectedW5 = 1 if districtW5 == 40014
replace GB15_reelectedW5 = 1 if districtW5 == 40015
replace GB15_reelectedW5 = 1 if districtW5 == 40016
replace GB15_reelectedW5 = 1 if districtW5 == 40017
replace GB15_reelectedW5 = 1 if districtW5 == 40018
replace GB15_reelectedW5 = 0 if districtW5 == 20001
replace GB15_reelectedW5 = 0 if districtW5 == 20002
replace GB15_reelectedW5 = 0 if districtW5 == 20003
replace GB15_reelectedW5 = 0 if districtW5 == 20004
replace GB15_reelectedW5 = 0 if districtW5 == 20005
replace GB15_reelectedW5 = 0 if districtW5 == 20006
replace GB15_reelectedW5 = 0 if districtW5 == 20007
replace GB15_reelectedW5 = 0 if districtW5 == 20008
replace GB15_reelectedW5 = 0 if districtW5 == 20009
replace GB15_reelectedW5 = 0 if districtW5 == 20010
replace GB15_reelectedW5 = 0 if districtW5 == 20011
replace GB15_reelectedW5 = 0 if districtW5 == 20012
replace GB15_reelectedW5 = 0 if districtW5 == 20013
replace GB15_reelectedW5 = 1 if districtW5 == 20014
replace GB15_reelectedW5 = 0 if districtW5 == 20015
replace GB15_reelectedW5 = 0 if districtW5 == 20016
replace GB15_reelectedW5 = 0 if districtW5 == 20017
replace GB15_reelectedW5 = 0 if districtW5 == 20018
replace GB15_reelectedW5 = 0 if districtW5 == 20019
replace GB15_reelectedW5 = 0 if districtW5 == 20020
replace GB15_reelectedW5 = 0 if districtW5 == 20021
replace GB15_reelectedW5 = 0 if districtW5 == 20022
replace GB15_reelectedW5 = 0 if districtW5 == 20023
replace GB15_reelectedW5 = 1 if districtW5 == 20024
replace GB15_reelectedW5 = 0 if districtW5 == 20025
replace GB15_reelectedW5 = 0 if districtW5 == 20026
replace GB15_reelectedW5 = 0 if districtW5 == 20027
replace GB15_reelectedW5 = 0 if districtW5 == 20028
replace GB15_reelectedW5 = 0 if districtW5 == 20029
replace GB15_reelectedW5 = 0 if districtW5 == 20030
replace GB15_reelectedW5 = 0 if districtW5 == 20031
replace GB15_reelectedW5 = 0 if districtW5 == 20032
replace GB15_reelectedW5 = 0 if districtW5 == 20033
replace GB15_reelectedW5 = 0 if districtW5 == 20034
replace GB15_reelectedW5 = 0 if districtW5 == 20035
replace GB15_reelectedW5 = 0 if districtW5 == 20036
replace GB15_reelectedW5 = 0 if districtW5 == 20037
replace GB15_reelectedW5 = 0 if districtW5 == 20038
replace GB15_reelectedW5 = 0 if districtW5 == 20039
replace GB15_reelectedW5 = 0 if districtW5 == 20040
replace GB15_reelectedW5 = 0 if districtW5 == 20041
replace GB15_reelectedW5 = 0 if districtW5 == 20042
replace GB15_reelectedW5 = 0 if districtW5 == 20043
replace GB15_reelectedW5 = 0 if districtW5 == 20044
replace GB15_reelectedW5 = 0 if districtW5 == 20045
replace GB15_reelectedW5 = 0 if districtW5 == 20046
replace GB15_reelectedW5 = 0 if districtW5 == 20047
replace GB15_reelectedW5 = 0 if districtW5 == 20048
replace GB15_reelectedW5 = 0 if districtW5 == 20049
replace GB15_reelectedW5 = 0 if districtW5 == 20050
replace GB15_reelectedW5 = 1 if districtW5 == 20051
replace GB15_reelectedW5 = 0 if districtW5 == 20052
replace GB15_reelectedW5 = 0 if districtW5 == 20053
replace GB15_reelectedW5 = 0 if districtW5 == 20054
replace GB15_reelectedW5 = 0 if districtW5 == 20055
replace GB15_reelectedW5 = 0 if districtW5 == 20056
replace GB15_reelectedW5 = 0 if districtW5 == 20057
replace GB15_reelectedW5 = 0 if districtW5 == 20058
replace GB15_reelectedW5 = 0 if districtW5 == 20059
replace GB15_reelectedW5 = 1 if districtW5 == 30041
replace GB15_reelectedW5 = 1 if districtW5 == 30042
replace GB15_reelectedW5 = 1 if districtW5 == 30043
replace GB15_reelectedW5 = 1 if districtW5 == 30044
replace GB15_reelectedW5 = 1 if districtW5 == 30045
replace GB15_reelectedW5 = 0 if districtW5 == 30046
replace GB15_reelectedW5 = 0 if districtW5 == 30047
replace GB15_reelectedW5 = 1 if districtW5 == 30048
replace GB15_reelectedW5 = 1 if districtW5 == 30049
replace GB15_reelectedW5 = 0 if districtW5 == 30050
replace GB15_reelectedW5 = 1 if districtW5 == 30051
replace GB15_reelectedW5 = 1 if districtW5 == 30052
replace GB15_reelectedW5 = 1 if districtW5 == 30053
replace GB15_reelectedW5 = 1 if districtW5 == 30054
replace GB15_reelectedW5 = 1 if districtW5 == 30055
replace GB15_reelectedW5 = 1 if districtW5 == 30056
replace GB15_reelectedW5 = 1 if districtW5 == 30057
replace GB15_reelectedW5 = 1 if districtW5 == 30058
replace GB15_reelectedW5 = 1 if districtW5 == 30059
replace GB15_reelectedW5 = 0 if districtW5 == 30060
replace GB15_reelectedW5 = 1 if districtW5 == 30061
replace GB15_reelectedW5 = 1 if districtW5 == 30062
replace GB15_reelectedW5 = 1 if districtW5 == 30063
replace GB15_reelectedW5 = 1 if districtW5 == 30064
replace GB15_reelectedW5 = 1 if districtW5 == 30065
replace GB15_reelectedW5 = 1 if districtW5 == 30066
replace GB15_reelectedW5 = 1 if districtW5 == 30067
replace GB15_reelectedW5 = 0 if districtW5 == 30068
replace GB15_reelectedW5 = 1 if districtW5 == 30069
replace GB15_reelectedW5 = 1 if districtW5 == 30070
replace GB15_reelectedW5 = 1 if districtW5 == 30071
replace GB15_reelectedW5 = 1 if districtW5 == 30072
replace GB15_reelectedW5 = 1 if districtW5 == 30073
replace GB15_reelectedW5 = 1 if districtW5 == 30074
replace GB15_reelectedW5 = 1 if districtW5 == 30075
replace GB15_reelectedW5 = 1 if districtW5 == 30076
replace GB15_reelectedW5 = 0 if districtW5 == 30077
replace GB15_reelectedW5 = 1 if districtW5 == 30078
replace GB15_reelectedW5 = 1 if districtW5 == 30079
replace GB15_reelectedW5 = 0 if districtW5 == 30080


******************************************************
** INCUMBENT PARTY REELECTED: 2017 GENERAL ELECTION **
******************************************************

gen GB17_reelectedW11 = .

replace GB17_reelectedW11 = 1 if districtW11 == 10530
replace GB17_reelectedW11 = 1 if districtW11 == 10531
replace GB17_reelectedW11 = 1 if districtW11 == 10532
replace GB17_reelectedW11 = 1 if districtW11 == 10533
replace GB17_reelectedW11 = 1 if districtW11 == 10534
replace GB17_reelectedW11 = 1 if districtW11 == 10535
replace GB17_reelectedW11 = 1 if districtW11 == 10536
replace GB17_reelectedW11 = 1 if districtW11 == 10537
replace GB17_reelectedW11 = 1 if districtW11 == 10538
replace GB17_reelectedW11 = 1 if districtW11 == 10539
replace GB17_reelectedW11 = 1 if districtW11 == 10540
replace GB17_reelectedW11 = 1 if districtW11 == 10541
replace GB17_reelectedW11 = 1 if districtW11 == 10542
replace GB17_reelectedW11 = 1 if districtW11 == 10543
replace GB17_reelectedW11 = 1 if districtW11 == 10544
replace GB17_reelectedW11 = 1 if districtW11 == 10545
replace GB17_reelectedW11 = 1 if districtW11 == 10546
replace GB17_reelectedW11 = 0 if districtW11 == 10547
replace GB17_reelectedW11 = 0 if districtW11 == 10548
replace GB17_reelectedW11 = 0 if districtW11 == 10549
replace GB17_reelectedW11 = 1 if districtW11 == 10550
replace GB17_reelectedW11 = 1 if districtW11 == 10551
replace GB17_reelectedW11 = 0 if districtW11 == 10552
replace GB17_reelectedW11 = 1 if districtW11 == 10553
replace GB17_reelectedW11 = 1 if districtW11 == 10554
replace GB17_reelectedW11 = 1 if districtW11 == 10555
replace GB17_reelectedW11 = 1 if districtW11 == 10556
replace GB17_reelectedW11 = 1 if districtW11 == 10557
replace GB17_reelectedW11 = 1 if districtW11 == 10558
replace GB17_reelectedW11 = 1 if districtW11 == 10559
replace GB17_reelectedW11 = 0 if districtW11 == 10560
replace GB17_reelectedW11 = 1 if districtW11 == 10561
replace GB17_reelectedW11 = 1 if districtW11 == 10562
replace GB17_reelectedW11 = 1 if districtW11 == 10563
replace GB17_reelectedW11 = 1 if districtW11 == 10564
replace GB17_reelectedW11 = 1 if districtW11 == 10565
replace GB17_reelectedW11 = 1 if districtW11 == 10566
replace GB17_reelectedW11 = 1 if districtW11 == 10567
replace GB17_reelectedW11 = 1 if districtW11 == 10568
replace GB17_reelectedW11 = 1 if districtW11 == 10569
replace GB17_reelectedW11 = 1 if districtW11 == 10570
replace GB17_reelectedW11 = 1 if districtW11 == 10571
replace GB17_reelectedW11 = 1 if districtW11 == 10572
replace GB17_reelectedW11 = 1 if districtW11 == 10573
replace GB17_reelectedW11 = 1 if districtW11 == 10574
replace GB17_reelectedW11 = 1 if districtW11 == 10575
replace GB17_reelectedW11 = 1 if districtW11 == 10576
replace GB17_reelectedW11 = 1 if districtW11 == 10577
replace GB17_reelectedW11 = 1 if districtW11 == 10578
replace GB17_reelectedW11 = 1 if districtW11 == 10579
replace GB17_reelectedW11 = 1 if districtW11 == 10580
replace GB17_reelectedW11 = 1 if districtW11 == 10581
replace GB17_reelectedW11 = 1 if districtW11 == 10582
replace GB17_reelectedW11 = 1 if districtW11 == 10583
replace GB17_reelectedW11 = 1 if districtW11 == 10584
replace GB17_reelectedW11 = 1 if districtW11 == 10585
replace GB17_reelectedW11 = 1 if districtW11 == 10586
replace GB17_reelectedW11 = 1 if districtW11 == 10587
replace GB17_reelectedW11 = 1 if districtW11 == 10588
replace GB17_reelectedW11 = 1 if districtW11 == 10589
replace GB17_reelectedW11 = 1 if districtW11 == 10590
replace GB17_reelectedW11 = 1 if districtW11 == 10591
replace GB17_reelectedW11 = 1 if districtW11 == 10592
replace GB17_reelectedW11 = 1 if districtW11 == 10593
replace GB17_reelectedW11 = 1 if districtW11 == 10594
replace GB17_reelectedW11 = 1 if districtW11 == 10595
replace GB17_reelectedW11 = 1 if districtW11 == 10596
replace GB17_reelectedW11 = 0 if districtW11 == 10597
replace GB17_reelectedW11 = 1 if districtW11 == 10598
replace GB17_reelectedW11 = 1 if districtW11 == 10599
replace GB17_reelectedW11 = 0 if districtW11 == 10600
replace GB17_reelectedW11 = 1 if districtW11 == 10601
replace GB17_reelectedW11 = 1 if districtW11 == 10602
replace GB17_reelectedW11 = 1 if districtW11 == 10603
replace GB17_reelectedW11 = 1 if districtW11 == 10604
replace GB17_reelectedW11 = 1 if districtW11 == 10605
replace GB17_reelectedW11 = 1 if districtW11 == 10606
replace GB17_reelectedW11 = 1 if districtW11 == 10607
replace GB17_reelectedW11 = 1 if districtW11 == 10608
replace GB17_reelectedW11 = 1 if districtW11 == 10609
replace GB17_reelectedW11 = 1 if districtW11 == 10610
replace GB17_reelectedW11 = 0 if districtW11 == 10611
replace GB17_reelectedW11 = 1 if districtW11 == 10612
replace GB17_reelectedW11 = 1 if districtW11 == 10613
replace GB17_reelectedW11 = 1 if districtW11 == 10614
replace GB17_reelectedW11 = 1 if districtW11 == 10615
replace GB17_reelectedW11 = 1 if districtW11 == 10616
replace GB17_reelectedW11 = 1 if districtW11 == 10617
replace GB17_reelectedW11 = 1 if districtW11 == 10618
replace GB17_reelectedW11 = 0 if districtW11 == 10619
replace GB17_reelectedW11 = 1 if districtW11 == 10620
replace GB17_reelectedW11 = 1 if districtW11 == 10621
replace GB17_reelectedW11 = 1 if districtW11 == 10622
replace GB17_reelectedW11 = 1 if districtW11 == 10623
replace GB17_reelectedW11 = 1 if districtW11 == 10624
replace GB17_reelectedW11 = 1 if districtW11 == 10625
replace GB17_reelectedW11 = 1 if districtW11 == 10626
replace GB17_reelectedW11 = 1 if districtW11 == 10627
replace GB17_reelectedW11 = 1 if districtW11 == 10628
replace GB17_reelectedW11 = 1 if districtW11 == 10629
replace GB17_reelectedW11 = 1 if districtW11 == 10630
replace GB17_reelectedW11 = 1 if districtW11 == 10631
replace GB17_reelectedW11 = 1 if districtW11 == 10632
replace GB17_reelectedW11 = 1 if districtW11 == 10633
replace GB17_reelectedW11 = 1 if districtW11 == 10634
replace GB17_reelectedW11 = 1 if districtW11 == 10635
replace GB17_reelectedW11 = 1 if districtW11 == 10636
replace GB17_reelectedW11 = 1 if districtW11 == 10637
replace GB17_reelectedW11 = 1 if districtW11 == 10638
replace GB17_reelectedW11 = 1 if districtW11 == 10639
replace GB17_reelectedW11 = 1 if districtW11 == 10640
replace GB17_reelectedW11 = 1 if districtW11 == 10641
replace GB17_reelectedW11 = 0 if districtW11 == 10642
replace GB17_reelectedW11 = 1 if districtW11 == 10643
replace GB17_reelectedW11 = 1 if districtW11 == 10644
replace GB17_reelectedW11 = 0 if districtW11 == 10645
replace GB17_reelectedW11 = 1 if districtW11 == 10646
replace GB17_reelectedW11 = 0 if districtW11 == 10647
replace GB17_reelectedW11 = 1 if districtW11 == 10648
replace GB17_reelectedW11 = 1 if districtW11 == 10649
replace GB17_reelectedW11 = 1 if districtW11 == 10650
replace GB17_reelectedW11 = 1 if districtW11 == 10651
replace GB17_reelectedW11 = 1 if districtW11 == 10652
replace GB17_reelectedW11 = 0 if districtW11 == 10653
replace GB17_reelectedW11 = 0 if districtW11 == 10654
replace GB17_reelectedW11 = 1 if districtW11 == 10655
replace GB17_reelectedW11 = 1 if districtW11 == 10656
replace GB17_reelectedW11 = 1 if districtW11 == 10657
replace GB17_reelectedW11 = 1 if districtW11 == 10658
replace GB17_reelectedW11 = 1 if districtW11 == 10659
replace GB17_reelectedW11 = 1 if districtW11 == 10660
replace GB17_reelectedW11 = 1 if districtW11 == 10661
replace GB17_reelectedW11 = 0 if districtW11 == 10662
replace GB17_reelectedW11 = 1 if districtW11 == 10663
replace GB17_reelectedW11 = 1 if districtW11 == 10664
replace GB17_reelectedW11 = 1 if districtW11 == 10665
replace GB17_reelectedW11 = 1 if districtW11 == 10666
replace GB17_reelectedW11 = 1 if districtW11 == 10667
replace GB17_reelectedW11 = 1 if districtW11 == 10668
replace GB17_reelectedW11 = 1 if districtW11 == 10669
replace GB17_reelectedW11 = 1 if districtW11 == 10670
replace GB17_reelectedW11 = 1 if districtW11 == 10671
replace GB17_reelectedW11 = 1 if districtW11 == 10672
replace GB17_reelectedW11 = 1 if districtW11 == 10673
replace GB17_reelectedW11 = 1 if districtW11 == 10674
replace GB17_reelectedW11 = 1 if districtW11 == 10675
replace GB17_reelectedW11 = 1 if districtW11 == 10676
replace GB17_reelectedW11 = 1 if districtW11 == 10677
replace GB17_reelectedW11 = 1 if districtW11 == 10678
replace GB17_reelectedW11 = 1 if districtW11 == 10679
replace GB17_reelectedW11 = 1 if districtW11 == 10680
replace GB17_reelectedW11 = 1 if districtW11 == 10681
replace GB17_reelectedW11 = 1 if districtW11 == 10682
replace GB17_reelectedW11 = 1 if districtW11 == 10683
replace GB17_reelectedW11 = 0 if districtW11 == 10684
replace GB17_reelectedW11 = 1 if districtW11 == 10685
replace GB17_reelectedW11 = 1 if districtW11 == 10686
replace GB17_reelectedW11 = 1 if districtW11 == 10687
replace GB17_reelectedW11 = 1 if districtW11 == 10688
replace GB17_reelectedW11 = 1 if districtW11 == 10689
replace GB17_reelectedW11 = 1 if districtW11 == 10690
replace GB17_reelectedW11 = 1 if districtW11 == 10691
replace GB17_reelectedW11 = 0 if districtW11 == 10692
replace GB17_reelectedW11 = 1 if districtW11 == 10693
replace GB17_reelectedW11 = 1 if districtW11 == 10694
replace GB17_reelectedW11 = 1 if districtW11 == 10695
replace GB17_reelectedW11 = 1 if districtW11 == 10696
replace GB17_reelectedW11 = 1 if districtW11 == 10697
replace GB17_reelectedW11 = 1 if districtW11 == 10698
replace GB17_reelectedW11 = 1 if districtW11 == 10699
replace GB17_reelectedW11 = 1 if districtW11 == 10700
replace GB17_reelectedW11 = 1 if districtW11 == 10701
replace GB17_reelectedW11 = 1 if districtW11 == 10702
replace GB17_reelectedW11 = 1 if districtW11 == 10703
replace GB17_reelectedW11 = 1 if districtW11 == 10704
replace GB17_reelectedW11 = 1 if districtW11 == 10705
replace GB17_reelectedW11 = 1 if districtW11 == 10706
replace GB17_reelectedW11 = 1 if districtW11 == 10707
replace GB17_reelectedW11 = 1 if districtW11 == 10708
replace GB17_reelectedW11 = 1 if districtW11 == 10709
replace GB17_reelectedW11 = 1 if districtW11 == 10710
replace GB17_reelectedW11 = 1 if districtW11 == 10711
replace GB17_reelectedW11 = 1 if districtW11 == 10712
replace GB17_reelectedW11 = 1 if districtW11 == 10713
replace GB17_reelectedW11 = 1 if districtW11 == 10714
replace GB17_reelectedW11 = 1 if districtW11 == 10715
replace GB17_reelectedW11 = 1 if districtW11 == 10716
replace GB17_reelectedW11 = 1 if districtW11 == 10717
replace GB17_reelectedW11 = 1 if districtW11 == 10718
replace GB17_reelectedW11 = 1 if districtW11 == 10719
replace GB17_reelectedW11 = 1 if districtW11 == 10720
replace GB17_reelectedW11 = 1 if districtW11 == 10721
replace GB17_reelectedW11 = 1 if districtW11 == 10722
replace GB17_reelectedW11 = 1 if districtW11 == 10723
replace GB17_reelectedW11 = 1 if districtW11 == 10724
replace GB17_reelectedW11 = 1 if districtW11 == 10725
replace GB17_reelectedW11 = 1 if districtW11 == 10726
replace GB17_reelectedW11 = 1 if districtW11 == 10727
replace GB17_reelectedW11 = 1 if districtW11 == 10728
replace GB17_reelectedW11 = 1 if districtW11 == 10729
replace GB17_reelectedW11 = 1 if districtW11 == 10730
replace GB17_reelectedW11 = 1 if districtW11 == 10731
replace GB17_reelectedW11 = 1 if districtW11 == 10732
replace GB17_reelectedW11 = 1 if districtW11 == 10733
replace GB17_reelectedW11 = 1 if districtW11 == 10734
replace GB17_reelectedW11 = 1 if districtW11 == 10735
replace GB17_reelectedW11 = 1 if districtW11 == 10736
replace GB17_reelectedW11 = 1 if districtW11 == 10737
replace GB17_reelectedW11 = 1 if districtW11 == 10738
replace GB17_reelectedW11 = 1 if districtW11 == 10739
replace GB17_reelectedW11 = 1 if districtW11 == 10740
replace GB17_reelectedW11 = 1 if districtW11 == 10741
replace GB17_reelectedW11 = 1 if districtW11 == 10742
replace GB17_reelectedW11 = 1 if districtW11 == 10743
replace GB17_reelectedW11 = 1 if districtW11 == 10744
replace GB17_reelectedW11 = 1 if districtW11 == 10745
replace GB17_reelectedW11 = 1 if districtW11 == 10746
replace GB17_reelectedW11 = 1 if districtW11 == 10747
replace GB17_reelectedW11 = 0 if districtW11 == 10748
replace GB17_reelectedW11 = 1 if districtW11 == 10749
replace GB17_reelectedW11 = 1 if districtW11 == 10750
replace GB17_reelectedW11 = 1 if districtW11 == 10751
replace GB17_reelectedW11 = 1 if districtW11 == 10752
replace GB17_reelectedW11 = 1 if districtW11 == 10753
replace GB17_reelectedW11 = 1 if districtW11 == 10754
replace GB17_reelectedW11 = 1 if districtW11 == 10755
replace GB17_reelectedW11 = 1 if districtW11 == 10756
replace GB17_reelectedW11 = 1 if districtW11 == 10757
replace GB17_reelectedW11 = 1 if districtW11 == 10758
replace GB17_reelectedW11 = 1 if districtW11 == 10759
replace GB17_reelectedW11 = 1 if districtW11 == 10760
replace GB17_reelectedW11 = 0 if districtW11 == 10761
replace GB17_reelectedW11 = 1 if districtW11 == 10762
replace GB17_reelectedW11 = 1 if districtW11 == 10763
replace GB17_reelectedW11 = 1 if districtW11 == 10764
replace GB17_reelectedW11 = 1 if districtW11 == 10765
replace GB17_reelectedW11 = 0 if districtW11 == 10766
replace GB17_reelectedW11 = 1 if districtW11 == 10767
replace GB17_reelectedW11 = 0 if districtW11 == 10768
replace GB17_reelectedW11 = 1 if districtW11 == 10769
replace GB17_reelectedW11 = 0 if districtW11 == 10770
replace GB17_reelectedW11 = 1 if districtW11 == 10771
replace GB17_reelectedW11 = 1 if districtW11 == 10772
replace GB17_reelectedW11 = 1 if districtW11 == 10773
replace GB17_reelectedW11 = 1 if districtW11 == 10774
replace GB17_reelectedW11 = 1 if districtW11 == 10775
replace GB17_reelectedW11 = 1 if districtW11 == 10776
replace GB17_reelectedW11 = 1 if districtW11 == 10777
replace GB17_reelectedW11 = 1 if districtW11 == 10778
replace GB17_reelectedW11 = 1 if districtW11 == 10779
replace GB17_reelectedW11 = 0 if districtW11 == 10780
replace GB17_reelectedW11 = 1 if districtW11 == 10781
replace GB17_reelectedW11 = 1 if districtW11 == 10782
replace GB17_reelectedW11 = 1 if districtW11 == 10783
replace GB17_reelectedW11 = 1 if districtW11 == 10784
replace GB17_reelectedW11 = 0 if districtW11 == 10785
replace GB17_reelectedW11 = 1 if districtW11 == 10786
replace GB17_reelectedW11 = 1 if districtW11 == 10787
replace GB17_reelectedW11 = 1 if districtW11 == 10788
replace GB17_reelectedW11 = 1 if districtW11 == 10789
replace GB17_reelectedW11 = 1 if districtW11 == 10790
replace GB17_reelectedW11 = 1 if districtW11 == 10791
replace GB17_reelectedW11 = 0 if districtW11 == 10792
replace GB17_reelectedW11 = 1 if districtW11 == 10793
replace GB17_reelectedW11 = 1 if districtW11 == 10794
replace GB17_reelectedW11 = 1 if districtW11 == 10795
replace GB17_reelectedW11 = 1 if districtW11 == 10796
replace GB17_reelectedW11 = 1 if districtW11 == 10797
replace GB17_reelectedW11 = 1 if districtW11 == 10798
replace GB17_reelectedW11 = 1 if districtW11 == 10799
replace GB17_reelectedW11 = 1 if districtW11 == 10800
replace GB17_reelectedW11 = 1 if districtW11 == 10801
replace GB17_reelectedW11 = 1 if districtW11 == 10802
replace GB17_reelectedW11 = 1 if districtW11 == 10803
replace GB17_reelectedW11 = 1 if districtW11 == 10804
replace GB17_reelectedW11 = 1 if districtW11 == 10805
replace GB17_reelectedW11 = 1 if districtW11 == 10806
replace GB17_reelectedW11 = 1 if districtW11 == 10807
replace GB17_reelectedW11 = 1 if districtW11 == 10808
replace GB17_reelectedW11 = 1 if districtW11 == 10809
replace GB17_reelectedW11 = 0 if districtW11 == 10810
replace GB17_reelectedW11 = 1 if districtW11 == 10811
replace GB17_reelectedW11 = 1 if districtW11 == 10812
replace GB17_reelectedW11 = 1 if districtW11 == 10813
replace GB17_reelectedW11 = 1 if districtW11 == 10814
replace GB17_reelectedW11 = 1 if districtW11 == 10815
replace GB17_reelectedW11 = 1 if districtW11 == 10816
replace GB17_reelectedW11 = 1 if districtW11 == 10817
replace GB17_reelectedW11 = 1 if districtW11 == 10818
replace GB17_reelectedW11 = 1 if districtW11 == 10819
replace GB17_reelectedW11 = 0 if districtW11 == 10820
replace GB17_reelectedW11 = 1 if districtW11 == 10821
replace GB17_reelectedW11 = 1 if districtW11 == 10822
replace GB17_reelectedW11 = 1 if districtW11 == 10823
replace GB17_reelectedW11 = 1 if districtW11 == 10824
replace GB17_reelectedW11 = 1 if districtW11 == 10825
replace GB17_reelectedW11 = 1 if districtW11 == 10826
replace GB17_reelectedW11 = 1 if districtW11 == 10827
replace GB17_reelectedW11 = 1 if districtW11 == 10828
replace GB17_reelectedW11 = 1 if districtW11 == 10829
replace GB17_reelectedW11 = 1 if districtW11 == 10830
replace GB17_reelectedW11 = 1 if districtW11 == 10831
replace GB17_reelectedW11 = 1 if districtW11 == 10832
replace GB17_reelectedW11 = 1 if districtW11 == 10833
replace GB17_reelectedW11 = 1 if districtW11 == 10834
replace GB17_reelectedW11 = 1 if districtW11 == 10835
replace GB17_reelectedW11 = 1 if districtW11 == 10836
replace GB17_reelectedW11 = 1 if districtW11 == 10837
replace GB17_reelectedW11 = 1 if districtW11 == 10838
replace GB17_reelectedW11 = 1 if districtW11 == 10839
replace GB17_reelectedW11 = 1 if districtW11 == 10840
replace GB17_reelectedW11 = 1 if districtW11 == 10841
replace GB17_reelectedW11 = 1 if districtW11 == 10842
replace GB17_reelectedW11 = 0 if districtW11 == 10843
replace GB17_reelectedW11 = 1 if districtW11 == 10844
replace GB17_reelectedW11 = 1 if districtW11 == 10845
replace GB17_reelectedW11 = 1 if districtW11 == 10846
replace GB17_reelectedW11 = 1 if districtW11 == 10847
replace GB17_reelectedW11 = 1 if districtW11 == 10848
replace GB17_reelectedW11 = 1 if districtW11 == 10849
replace GB17_reelectedW11 = 1 if districtW11 == 10850
replace GB17_reelectedW11 = 1 if districtW11 == 10851
replace GB17_reelectedW11 = 1 if districtW11 == 10852
replace GB17_reelectedW11 = 1 if districtW11 == 10853
replace GB17_reelectedW11 = 1 if districtW11 == 10854
replace GB17_reelectedW11 = 1 if districtW11 == 10855
replace GB17_reelectedW11 = 1 if districtW11 == 10856
replace GB17_reelectedW11 = 1 if districtW11 == 10857
replace GB17_reelectedW11 = 1 if districtW11 == 10858
replace GB17_reelectedW11 = 1 if districtW11 == 10859
replace GB17_reelectedW11 = 1 if districtW11 == 10860
replace GB17_reelectedW11 = 1 if districtW11 == 10861
replace GB17_reelectedW11 = 1 if districtW11 == 10862
replace GB17_reelectedW11 = 1 if districtW11 == 10863
replace GB17_reelectedW11 = 1 if districtW11 == 10864
replace GB17_reelectedW11 = 1 if districtW11 == 10865
replace GB17_reelectedW11 = 0 if districtW11 == 10866
replace GB17_reelectedW11 = 1 if districtW11 == 10867
replace GB17_reelectedW11 = 1 if districtW11 == 10868
replace GB17_reelectedW11 = 1 if districtW11 == 10869
replace GB17_reelectedW11 = 1 if districtW11 == 10870
replace GB17_reelectedW11 = 0 if districtW11 == 10871
replace GB17_reelectedW11 = 1 if districtW11 == 10872
replace GB17_reelectedW11 = 0 if districtW11 == 10873
replace GB17_reelectedW11 = 0 if districtW11 == 10874
replace GB17_reelectedW11 = 1 if districtW11 == 10875
replace GB17_reelectedW11 = 1 if districtW11 == 10876
replace GB17_reelectedW11 = 1 if districtW11 == 10877
replace GB17_reelectedW11 = 0 if districtW11 == 10878
replace GB17_reelectedW11 = 1 if districtW11 == 10879
replace GB17_reelectedW11 = 0 if districtW11 == 10880
replace GB17_reelectedW11 = 1 if districtW11 == 10881
replace GB17_reelectedW11 = 1 if districtW11 == 10882
replace GB17_reelectedW11 = 1 if districtW11 == 10883
replace GB17_reelectedW11 = 0 if districtW11 == 10884
replace GB17_reelectedW11 = 1 if districtW11 == 10885
replace GB17_reelectedW11 = 1 if districtW11 == 10886
replace GB17_reelectedW11 = 1 if districtW11 == 10887
replace GB17_reelectedW11 = 1 if districtW11 == 10888
replace GB17_reelectedW11 = 0 if districtW11 == 10889
replace GB17_reelectedW11 = 1 if districtW11 == 10890
replace GB17_reelectedW11 = 1 if districtW11 == 10891
replace GB17_reelectedW11 = 1 if districtW11 == 10892
replace GB17_reelectedW11 = 1 if districtW11 == 10893
replace GB17_reelectedW11 = 1 if districtW11 == 10894
replace GB17_reelectedW11 = 1 if districtW11 == 10895
replace GB17_reelectedW11 = 1 if districtW11 == 10896
replace GB17_reelectedW11 = 1 if districtW11 == 10897
replace GB17_reelectedW11 = 1 if districtW11 == 10898
replace GB17_reelectedW11 = 1 if districtW11 == 10899
replace GB17_reelectedW11 = 1 if districtW11 == 10900
replace GB17_reelectedW11 = 1 if districtW11 == 10901
replace GB17_reelectedW11 = 1 if districtW11 == 10902
replace GB17_reelectedW11 = 1 if districtW11 == 10903
replace GB17_reelectedW11 = 1 if districtW11 == 10904
replace GB17_reelectedW11 = 1 if districtW11 == 10905
replace GB17_reelectedW11 = 1 if districtW11 == 10906
replace GB17_reelectedW11 = 1 if districtW11 == 10907
replace GB17_reelectedW11 = 1 if districtW11 == 10908
replace GB17_reelectedW11 = 1 if districtW11 == 10909
replace GB17_reelectedW11 = 1 if districtW11 == 10910
replace GB17_reelectedW11 = 1 if districtW11 == 10911
replace GB17_reelectedW11 = 1 if districtW11 == 10912
replace GB17_reelectedW11 = 1 if districtW11 == 10913
replace GB17_reelectedW11 = 1 if districtW11 == 10914
replace GB17_reelectedW11 = 1 if districtW11 == 10915
replace GB17_reelectedW11 = 1 if districtW11 == 10916
replace GB17_reelectedW11 = 1 if districtW11 == 10917
replace GB17_reelectedW11 = 1 if districtW11 == 10918
replace GB17_reelectedW11 = 1 if districtW11 == 10919
replace GB17_reelectedW11 = 1 if districtW11 == 10920
replace GB17_reelectedW11 = 1 if districtW11 == 10921
replace GB17_reelectedW11 = 0 if districtW11 == 10922
replace GB17_reelectedW11 = 1 if districtW11 == 10923
replace GB17_reelectedW11 = 1 if districtW11 == 10924
replace GB17_reelectedW11 = 1 if districtW11 == 10925
replace GB17_reelectedW11 = 1 if districtW11 == 10926
replace GB17_reelectedW11 = 1 if districtW11 == 10927
replace GB17_reelectedW11 = 1 if districtW11 == 10928
replace GB17_reelectedW11 = 1 if districtW11 == 10929
replace GB17_reelectedW11 = 1 if districtW11 == 10930
replace GB17_reelectedW11 = 1 if districtW11 == 10931
replace GB17_reelectedW11 = 1 if districtW11 == 10932
replace GB17_reelectedW11 = 1 if districtW11 == 10933
replace GB17_reelectedW11 = 1 if districtW11 == 10934
replace GB17_reelectedW11 = 1 if districtW11 == 10935
replace GB17_reelectedW11 = 1 if districtW11 == 10936
replace GB17_reelectedW11 = 1 if districtW11 == 10937
replace GB17_reelectedW11 = 1 if districtW11 == 10938
replace GB17_reelectedW11 = 1 if districtW11 == 10939
replace GB17_reelectedW11 = 1 if districtW11 == 10940
replace GB17_reelectedW11 = 1 if districtW11 == 10941
replace GB17_reelectedW11 = 1 if districtW11 == 10942
replace GB17_reelectedW11 = 1 if districtW11 == 10943
replace GB17_reelectedW11 = 1 if districtW11 == 10944
replace GB17_reelectedW11 = 1 if districtW11 == 10945
replace GB17_reelectedW11 = 1 if districtW11 == 10946
replace GB17_reelectedW11 = 1 if districtW11 == 10947
replace GB17_reelectedW11 = 1 if districtW11 == 10948
replace GB17_reelectedW11 = 1 if districtW11 == 10949
replace GB17_reelectedW11 = 1 if districtW11 == 10950
replace GB17_reelectedW11 = 1 if districtW11 == 10951
replace GB17_reelectedW11 = 1 if districtW11 == 10952
replace GB17_reelectedW11 = 1 if districtW11 == 10953
replace GB17_reelectedW11 = 1 if districtW11 == 10954
replace GB17_reelectedW11 = 1 if districtW11 == 10955
replace GB17_reelectedW11 = 1 if districtW11 == 10956
replace GB17_reelectedW11 = 1 if districtW11 == 10957
replace GB17_reelectedW11 = 0 if districtW11 == 10958
replace GB17_reelectedW11 = 1 if districtW11 == 10959
replace GB17_reelectedW11 = 1 if districtW11 == 10960
replace GB17_reelectedW11 = 1 if districtW11 == 10961
replace GB17_reelectedW11 = 1 if districtW11 == 10962
replace GB17_reelectedW11 = 1 if districtW11 == 10963
replace GB17_reelectedW11 = 1 if districtW11 == 10964
replace GB17_reelectedW11 = 1 if districtW11 == 10965
replace GB17_reelectedW11 = 1 if districtW11 == 10966
replace GB17_reelectedW11 = 1 if districtW11 == 10967
replace GB17_reelectedW11 = 1 if districtW11 == 10968
replace GB17_reelectedW11 = 1 if districtW11 == 10969
replace GB17_reelectedW11 = 1 if districtW11 == 10970
replace GB17_reelectedW11 = 0 if districtW11 == 10971
replace GB17_reelectedW11 = 0 if districtW11 == 10972
replace GB17_reelectedW11 = 1 if districtW11 == 10973
replace GB17_reelectedW11 = 0 if districtW11 == 10974
replace GB17_reelectedW11 = 1 if districtW11 == 10975
replace GB17_reelectedW11 = 1 if districtW11 == 10976
replace GB17_reelectedW11 = 1 if districtW11 == 10977
replace GB17_reelectedW11 = 1 if districtW11 == 10978
replace GB17_reelectedW11 = 1 if districtW11 == 10979
replace GB17_reelectedW11 = 0 if districtW11 == 10980
replace GB17_reelectedW11 = 1 if districtW11 == 10981
replace GB17_reelectedW11 = 1 if districtW11 == 10982
replace GB17_reelectedW11 = 1 if districtW11 == 10983
replace GB17_reelectedW11 = 1 if districtW11 == 10984
replace GB17_reelectedW11 = 1 if districtW11 == 10985
replace GB17_reelectedW11 = 1 if districtW11 == 10986
replace GB17_reelectedW11 = 1 if districtW11 == 10987
replace GB17_reelectedW11 = 1 if districtW11 == 10988
replace GB17_reelectedW11 = 1 if districtW11 == 10989
replace GB17_reelectedW11 = 1 if districtW11 == 10990
replace GB17_reelectedW11 = 1 if districtW11 == 10991
replace GB17_reelectedW11 = 1 if districtW11 == 10992
replace GB17_reelectedW11 = 1 if districtW11 == 10993
replace GB17_reelectedW11 = 1 if districtW11 == 10994
replace GB17_reelectedW11 = 1 if districtW11 == 10995
replace GB17_reelectedW11 = 1 if districtW11 == 10996
replace GB17_reelectedW11 = 1 if districtW11 == 10997
replace GB17_reelectedW11 = 1 if districtW11 == 10998
replace GB17_reelectedW11 = 1 if districtW11 == 10999
replace GB17_reelectedW11 = 1 if districtW11 == 11000
replace GB17_reelectedW11 = 1 if districtW11 == 11001
replace GB17_reelectedW11 = 1 if districtW11 == 11002
replace GB17_reelectedW11 = 1 if districtW11 == 11003
replace GB17_reelectedW11 = 1 if districtW11 == 11004
replace GB17_reelectedW11 = 0 if districtW11 == 11005
replace GB17_reelectedW11 = 1 if districtW11 == 11006
replace GB17_reelectedW11 = 1 if districtW11 == 11007
replace GB17_reelectedW11 = 1 if districtW11 == 11008
replace GB17_reelectedW11 = 1 if districtW11 == 11009
replace GB17_reelectedW11 = 1 if districtW11 == 11010
replace GB17_reelectedW11 = 0 if districtW11 == 11011
replace GB17_reelectedW11 = 1 if districtW11 == 11012
replace GB17_reelectedW11 = 1 if districtW11 == 11013
replace GB17_reelectedW11 = 1 if districtW11 == 11014
replace GB17_reelectedW11 = 1 if districtW11 == 11015
replace GB17_reelectedW11 = 1 if districtW11 == 11016
replace GB17_reelectedW11 = 1 if districtW11 == 11017
replace GB17_reelectedW11 = 0 if districtW11 == 11018
replace GB17_reelectedW11 = 0 if districtW11 == 11019
replace GB17_reelectedW11 = 1 if districtW11 == 11020
replace GB17_reelectedW11 = 1 if districtW11 == 11021
replace GB17_reelectedW11 = 1 if districtW11 == 11022
replace GB17_reelectedW11 = 1 if districtW11 == 11023
replace GB17_reelectedW11 = 0 if districtW11 == 11024
replace GB17_reelectedW11 = 1 if districtW11 == 11025
replace GB17_reelectedW11 = 1 if districtW11 == 11026
replace GB17_reelectedW11 = 1 if districtW11 == 11027
replace GB17_reelectedW11 = 1 if districtW11 == 11028
replace GB17_reelectedW11 = 1 if districtW11 == 11029
replace GB17_reelectedW11 = 1 if districtW11 == 11030
replace GB17_reelectedW11 = 1 if districtW11 == 11031
replace GB17_reelectedW11 = 1 if districtW11 == 11032
replace GB17_reelectedW11 = 1 if districtW11 == 11033
replace GB17_reelectedW11 = 1 if districtW11 == 11034
replace GB17_reelectedW11 = 1 if districtW11 == 11035
replace GB17_reelectedW11 = 1 if districtW11 == 11036
replace GB17_reelectedW11 = 1 if districtW11 == 11037
replace GB17_reelectedW11 = 1 if districtW11 == 11038
replace GB17_reelectedW11 = 1 if districtW11 == 11039
replace GB17_reelectedW11 = 1 if districtW11 == 11040
replace GB17_reelectedW11 = 1 if districtW11 == 11041
replace GB17_reelectedW11 = 1 if districtW11 == 11042
replace GB17_reelectedW11 = 1 if districtW11 == 11043
replace GB17_reelectedW11 = 1 if districtW11 == 11044
replace GB17_reelectedW11 = 1 if districtW11 == 11045
replace GB17_reelectedW11 = 1 if districtW11 == 11046
replace GB17_reelectedW11 = 1 if districtW11 == 11047
replace GB17_reelectedW11 = 1 if districtW11 == 11048
replace GB17_reelectedW11 = 1 if districtW11 == 11049
replace GB17_reelectedW11 = 1 if districtW11 == 11050
replace GB17_reelectedW11 = 1 if districtW11 == 11051
replace GB17_reelectedW11 = 1 if districtW11 == 11052
replace GB17_reelectedW11 = 1 if districtW11 == 11053
replace GB17_reelectedW11 = 1 if districtW11 == 11054
replace GB17_reelectedW11 = 1 if districtW11 == 11055
replace GB17_reelectedW11 = 1 if districtW11 == 11056
replace GB17_reelectedW11 = 1 if districtW11 == 11057
replace GB17_reelectedW11 = 1 if districtW11 == 11058
replace GB17_reelectedW11 = 1 if districtW11 == 11059
replace GB17_reelectedW11 = 1 if districtW11 == 11060
replace GB17_reelectedW11 = 1 if districtW11 == 11061
replace GB17_reelectedW11 = 1 if districtW11 == 11062
replace GB17_reelectedW11 = 1 if districtW11 == 40001
replace GB17_reelectedW11 = 1 if districtW11 == 40002
replace GB17_reelectedW11 = 1 if districtW11 == 40003
replace GB17_reelectedW11 = 1 if districtW11 == 40004
replace GB17_reelectedW11 = 1 if districtW11 == 40005
replace GB17_reelectedW11 = 1 if districtW11 == 40006
replace GB17_reelectedW11 = 1 if districtW11 == 40007
replace GB17_reelectedW11 = 1 if districtW11 == 40008
replace GB17_reelectedW11 = 1 if districtW11 == 40009
replace GB17_reelectedW11 = 1 if districtW11 == 40010
replace GB17_reelectedW11 = 1 if districtW11 == 40011
replace GB17_reelectedW11 = 1 if districtW11 == 40012
replace GB17_reelectedW11 = 1 if districtW11 == 40013
replace GB17_reelectedW11 = 1 if districtW11 == 40014
replace GB17_reelectedW11 = 1 if districtW11 == 40015
replace GB17_reelectedW11 = 1 if districtW11 == 40016
replace GB17_reelectedW11 = 1 if districtW11 == 40017
replace GB17_reelectedW11 = 1 if districtW11 == 40018
replace GB17_reelectedW11 = 1 if districtW11 == 20001
replace GB17_reelectedW11 = 0 if districtW11 == 20002
replace GB17_reelectedW11 = 1 if districtW11 == 20003
replace GB17_reelectedW11 = 0 if districtW11 == 20004
replace GB17_reelectedW11 = 1 if districtW11 == 20005
replace GB17_reelectedW11 = 0 if districtW11 == 20006
replace GB17_reelectedW11 = 0 if districtW11 == 20007
replace GB17_reelectedW11 = 0 if districtW11 == 20008
replace GB17_reelectedW11 = 0 if districtW11 == 20009
replace GB17_reelectedW11 = 1 if districtW11 == 20010
replace GB17_reelectedW11 = 0 if districtW11 == 20011
replace GB17_reelectedW11 = 1 if districtW11 == 20012
replace GB17_reelectedW11 = 0 if districtW11 == 20013
replace GB17_reelectedW11 = 1 if districtW11 == 20014
replace GB17_reelectedW11 = 1 if districtW11 == 20015
replace GB17_reelectedW11 = 1 if districtW11 == 20016
replace GB17_reelectedW11 = 1 if districtW11 == 20017
replace GB17_reelectedW11 = 0 if districtW11 == 20018
replace GB17_reelectedW11 = 1 if districtW11 == 20019
replace GB17_reelectedW11 = 0 if districtW11 == 20020
replace GB17_reelectedW11 = 0 if districtW11 == 20021
replace GB17_reelectedW11 = 1 if districtW11 == 20022
replace GB17_reelectedW11 = 1 if districtW11 == 20023
replace GB17_reelectedW11 = 1 if districtW11 == 20024
replace GB17_reelectedW11 = 1 if districtW11 == 20025
replace GB17_reelectedW11 = 0 if districtW11 == 20026
replace GB17_reelectedW11 = 1 if districtW11 == 20027
replace GB17_reelectedW11 = 1 if districtW11 == 20028
replace GB17_reelectedW11 = 1 if districtW11 == 20029
replace GB17_reelectedW11 = 1 if districtW11 == 20030
replace GB17_reelectedW11 = 1 if districtW11 == 20031
replace GB17_reelectedW11 = 0 if districtW11 == 20032
replace GB17_reelectedW11 = 1 if districtW11 == 20033
replace GB17_reelectedW11 = 1 if districtW11 == 20034
replace GB17_reelectedW11 = 1 if districtW11 == 20035
replace GB17_reelectedW11 = 1 if districtW11 == 20036
replace GB17_reelectedW11 = 0 if districtW11 == 20037
replace GB17_reelectedW11 = 1 if districtW11 == 20038
replace GB17_reelectedW11 = 1 if districtW11 == 20039
replace GB17_reelectedW11 = 1 if districtW11 == 20040
replace GB17_reelectedW11 = 0 if districtW11 == 20041
replace GB17_reelectedW11 = 1 if districtW11 == 20042
replace GB17_reelectedW11 = 1 if districtW11 == 20043
replace GB17_reelectedW11 = 1 if districtW11 == 20044
replace GB17_reelectedW11 = 0 if districtW11 == 20045
replace GB17_reelectedW11 = 0 if districtW11 == 20046
replace GB17_reelectedW11 = 1 if districtW11 == 20047
replace GB17_reelectedW11 = 1 if districtW11 == 20048
replace GB17_reelectedW11 = 1 if districtW11 == 20049
replace GB17_reelectedW11 = 0 if districtW11 == 20050
replace GB17_reelectedW11 = 1 if districtW11 == 20051
replace GB17_reelectedW11 = 1 if districtW11 == 20052
replace GB17_reelectedW11 = 1 if districtW11 == 20053
replace GB17_reelectedW11 = 1 if districtW11 == 20054
replace GB17_reelectedW11 = 1 if districtW11 == 20055
replace GB17_reelectedW11 = 0 if districtW11 == 20056
replace GB17_reelectedW11 = 0 if districtW11 == 20057
replace GB17_reelectedW11 = 0 if districtW11 == 20058
replace GB17_reelectedW11 = 1 if districtW11 == 20059
replace GB17_reelectedW11 = 1 if districtW11 == 30041
replace GB17_reelectedW11 = 1 if districtW11 == 30042
replace GB17_reelectedW11 = 1 if districtW11 == 30043
replace GB17_reelectedW11 = 1 if districtW11 == 30044
replace GB17_reelectedW11 = 1 if districtW11 == 30045
replace GB17_reelectedW11 = 0 if districtW11 == 30046
replace GB17_reelectedW11 = 1 if districtW11 == 30047
replace GB17_reelectedW11 = 1 if districtW11 == 30048
replace GB17_reelectedW11 = 1 if districtW11 == 30049
replace GB17_reelectedW11 = 1 if districtW11 == 30050
replace GB17_reelectedW11 = 0 if districtW11 == 30051
replace GB17_reelectedW11 = 1 if districtW11 == 30052
replace GB17_reelectedW11 = 1 if districtW11 == 30053
replace GB17_reelectedW11 = 1 if districtW11 == 30054
replace GB17_reelectedW11 = 1 if districtW11 == 30055
replace GB17_reelectedW11 = 1 if districtW11 == 30056
replace GB17_reelectedW11 = 1 if districtW11 == 30057
replace GB17_reelectedW11 = 1 if districtW11 == 30058
replace GB17_reelectedW11 = 1 if districtW11 == 30059
replace GB17_reelectedW11 = 0 if districtW11 == 30060
replace GB17_reelectedW11 = 1 if districtW11 == 30061
replace GB17_reelectedW11 = 1 if districtW11 == 30062
replace GB17_reelectedW11 = 1 if districtW11 == 30063
replace GB17_reelectedW11 = 0 if districtW11 == 30064
replace GB17_reelectedW11 = 1 if districtW11 == 30065
replace GB17_reelectedW11 = 1 if districtW11 == 30066
replace GB17_reelectedW11 = 1 if districtW11 == 30067
replace GB17_reelectedW11 = 1 if districtW11 == 30068
replace GB17_reelectedW11 = 0 if districtW11 == 30069
replace GB17_reelectedW11 = 1 if districtW11 == 30070
replace GB17_reelectedW11 = 1 if districtW11 == 30071
replace GB17_reelectedW11 = 1 if districtW11 == 30072
replace GB17_reelectedW11 = 1 if districtW11 == 30073
replace GB17_reelectedW11 = 1 if districtW11 == 30074
replace GB17_reelectedW11 = 1 if districtW11 == 30075
replace GB17_reelectedW11 = 1 if districtW11 == 30076
replace GB17_reelectedW11 = 1 if districtW11 == 30077
replace GB17_reelectedW11 = 1 if districtW11 == 30078
replace GB17_reelectedW11 = 1 if districtW11 == 30079
replace GB17_reelectedW11 = 1 if districtW11 == 30080

gen GB17_reelectedW12 = .

replace GB17_reelectedW12 = 1 if districtW12 == 10530
replace GB17_reelectedW12 = 1 if districtW12 == 10531
replace GB17_reelectedW12 = 1 if districtW12 == 10532
replace GB17_reelectedW12 = 1 if districtW12 == 10533
replace GB17_reelectedW12 = 1 if districtW12 == 10534
replace GB17_reelectedW12 = 1 if districtW12 == 10535
replace GB17_reelectedW12 = 1 if districtW12 == 10536
replace GB17_reelectedW12 = 1 if districtW12 == 10537
replace GB17_reelectedW12 = 1 if districtW12 == 10538
replace GB17_reelectedW12 = 1 if districtW12 == 10539
replace GB17_reelectedW12 = 1 if districtW12 == 10540
replace GB17_reelectedW12 = 1 if districtW12 == 10541
replace GB17_reelectedW12 = 1 if districtW12 == 10542
replace GB17_reelectedW12 = 1 if districtW12 == 10543
replace GB17_reelectedW12 = 1 if districtW12 == 10544
replace GB17_reelectedW12 = 1 if districtW12 == 10545
replace GB17_reelectedW12 = 1 if districtW12 == 10546
replace GB17_reelectedW12 = 0 if districtW12 == 10547
replace GB17_reelectedW12 = 0 if districtW12 == 10548
replace GB17_reelectedW12 = 0 if districtW12 == 10549
replace GB17_reelectedW12 = 1 if districtW12 == 10550
replace GB17_reelectedW12 = 1 if districtW12 == 10551
replace GB17_reelectedW12 = 0 if districtW12 == 10552
replace GB17_reelectedW12 = 1 if districtW12 == 10553
replace GB17_reelectedW12 = 1 if districtW12 == 10554
replace GB17_reelectedW12 = 1 if districtW12 == 10555
replace GB17_reelectedW12 = 1 if districtW12 == 10556
replace GB17_reelectedW12 = 1 if districtW12 == 10557
replace GB17_reelectedW12 = 1 if districtW12 == 10558
replace GB17_reelectedW12 = 1 if districtW12 == 10559
replace GB17_reelectedW12 = 0 if districtW12 == 10560
replace GB17_reelectedW12 = 1 if districtW12 == 10561
replace GB17_reelectedW12 = 1 if districtW12 == 10562
replace GB17_reelectedW12 = 1 if districtW12 == 10563
replace GB17_reelectedW12 = 1 if districtW12 == 10564
replace GB17_reelectedW12 = 1 if districtW12 == 10565
replace GB17_reelectedW12 = 1 if districtW12 == 10566
replace GB17_reelectedW12 = 1 if districtW12 == 10567
replace GB17_reelectedW12 = 1 if districtW12 == 10568
replace GB17_reelectedW12 = 1 if districtW12 == 10569
replace GB17_reelectedW12 = 1 if districtW12 == 10570
replace GB17_reelectedW12 = 1 if districtW12 == 10571
replace GB17_reelectedW12 = 1 if districtW12 == 10572
replace GB17_reelectedW12 = 1 if districtW12 == 10573
replace GB17_reelectedW12 = 1 if districtW12 == 10574
replace GB17_reelectedW12 = 1 if districtW12 == 10575
replace GB17_reelectedW12 = 1 if districtW12 == 10576
replace GB17_reelectedW12 = 1 if districtW12 == 10577
replace GB17_reelectedW12 = 1 if districtW12 == 10578
replace GB17_reelectedW12 = 1 if districtW12 == 10579
replace GB17_reelectedW12 = 1 if districtW12 == 10580
replace GB17_reelectedW12 = 1 if districtW12 == 10581
replace GB17_reelectedW12 = 1 if districtW12 == 10582
replace GB17_reelectedW12 = 1 if districtW12 == 10583
replace GB17_reelectedW12 = 1 if districtW12 == 10584
replace GB17_reelectedW12 = 1 if districtW12 == 10585
replace GB17_reelectedW12 = 1 if districtW12 == 10586
replace GB17_reelectedW12 = 1 if districtW12 == 10587
replace GB17_reelectedW12 = 1 if districtW12 == 10588
replace GB17_reelectedW12 = 1 if districtW12 == 10589
replace GB17_reelectedW12 = 1 if districtW12 == 10590
replace GB17_reelectedW12 = 1 if districtW12 == 10591
replace GB17_reelectedW12 = 1 if districtW12 == 10592
replace GB17_reelectedW12 = 1 if districtW12 == 10593
replace GB17_reelectedW12 = 1 if districtW12 == 10594
replace GB17_reelectedW12 = 1 if districtW12 == 10595
replace GB17_reelectedW12 = 1 if districtW12 == 10596
replace GB17_reelectedW12 = 0 if districtW12 == 10597
replace GB17_reelectedW12 = 1 if districtW12 == 10598
replace GB17_reelectedW12 = 1 if districtW12 == 10599
replace GB17_reelectedW12 = 0 if districtW12 == 10600
replace GB17_reelectedW12 = 1 if districtW12 == 10601
replace GB17_reelectedW12 = 1 if districtW12 == 10602
replace GB17_reelectedW12 = 1 if districtW12 == 10603
replace GB17_reelectedW12 = 1 if districtW12 == 10604
replace GB17_reelectedW12 = 1 if districtW12 == 10605
replace GB17_reelectedW12 = 1 if districtW12 == 10606
replace GB17_reelectedW12 = 1 if districtW12 == 10607
replace GB17_reelectedW12 = 1 if districtW12 == 10608
replace GB17_reelectedW12 = 1 if districtW12 == 10609
replace GB17_reelectedW12 = 1 if districtW12 == 10610
replace GB17_reelectedW12 = 0 if districtW12 == 10611
replace GB17_reelectedW12 = 1 if districtW12 == 10612
replace GB17_reelectedW12 = 1 if districtW12 == 10613
replace GB17_reelectedW12 = 1 if districtW12 == 10614
replace GB17_reelectedW12 = 1 if districtW12 == 10615
replace GB17_reelectedW12 = 1 if districtW12 == 10616
replace GB17_reelectedW12 = 1 if districtW12 == 10617
replace GB17_reelectedW12 = 1 if districtW12 == 10618
replace GB17_reelectedW12 = 0 if districtW12 == 10619
replace GB17_reelectedW12 = 1 if districtW12 == 10620
replace GB17_reelectedW12 = 1 if districtW12 == 10621
replace GB17_reelectedW12 = 1 if districtW12 == 10622
replace GB17_reelectedW12 = 1 if districtW12 == 10623
replace GB17_reelectedW12 = 1 if districtW12 == 10624
replace GB17_reelectedW12 = 1 if districtW12 == 10625
replace GB17_reelectedW12 = 1 if districtW12 == 10626
replace GB17_reelectedW12 = 1 if districtW12 == 10627
replace GB17_reelectedW12 = 1 if districtW12 == 10628
replace GB17_reelectedW12 = 1 if districtW12 == 10629
replace GB17_reelectedW12 = 1 if districtW12 == 10630
replace GB17_reelectedW12 = 1 if districtW12 == 10631
replace GB17_reelectedW12 = 1 if districtW12 == 10632
replace GB17_reelectedW12 = 1 if districtW12 == 10633
replace GB17_reelectedW12 = 1 if districtW12 == 10634
replace GB17_reelectedW12 = 1 if districtW12 == 10635
replace GB17_reelectedW12 = 1 if districtW12 == 10636
replace GB17_reelectedW12 = 1 if districtW12 == 10637
replace GB17_reelectedW12 = 1 if districtW12 == 10638
replace GB17_reelectedW12 = 1 if districtW12 == 10639
replace GB17_reelectedW12 = 1 if districtW12 == 10640
replace GB17_reelectedW12 = 1 if districtW12 == 10641
replace GB17_reelectedW12 = 0 if districtW12 == 10642
replace GB17_reelectedW12 = 1 if districtW12 == 10643
replace GB17_reelectedW12 = 1 if districtW12 == 10644
replace GB17_reelectedW12 = 0 if districtW12 == 10645
replace GB17_reelectedW12 = 1 if districtW12 == 10646
replace GB17_reelectedW12 = 0 if districtW12 == 10647
replace GB17_reelectedW12 = 1 if districtW12 == 10648
replace GB17_reelectedW12 = 1 if districtW12 == 10649
replace GB17_reelectedW12 = 1 if districtW12 == 10650
replace GB17_reelectedW12 = 1 if districtW12 == 10651
replace GB17_reelectedW12 = 1 if districtW12 == 10652
replace GB17_reelectedW12 = 0 if districtW12 == 10653
replace GB17_reelectedW12 = 0 if districtW12 == 10654
replace GB17_reelectedW12 = 1 if districtW12 == 10655
replace GB17_reelectedW12 = 1 if districtW12 == 10656
replace GB17_reelectedW12 = 1 if districtW12 == 10657
replace GB17_reelectedW12 = 1 if districtW12 == 10658
replace GB17_reelectedW12 = 1 if districtW12 == 10659
replace GB17_reelectedW12 = 1 if districtW12 == 10660
replace GB17_reelectedW12 = 1 if districtW12 == 10661
replace GB17_reelectedW12 = 0 if districtW12 == 10662
replace GB17_reelectedW12 = 1 if districtW12 == 10663
replace GB17_reelectedW12 = 1 if districtW12 == 10664
replace GB17_reelectedW12 = 1 if districtW12 == 10665
replace GB17_reelectedW12 = 1 if districtW12 == 10666
replace GB17_reelectedW12 = 1 if districtW12 == 10667
replace GB17_reelectedW12 = 1 if districtW12 == 10668
replace GB17_reelectedW12 = 1 if districtW12 == 10669
replace GB17_reelectedW12 = 1 if districtW12 == 10670
replace GB17_reelectedW12 = 1 if districtW12 == 10671
replace GB17_reelectedW12 = 1 if districtW12 == 10672
replace GB17_reelectedW12 = 1 if districtW12 == 10673
replace GB17_reelectedW12 = 1 if districtW12 == 10674
replace GB17_reelectedW12 = 1 if districtW12 == 10675
replace GB17_reelectedW12 = 1 if districtW12 == 10676
replace GB17_reelectedW12 = 1 if districtW12 == 10677
replace GB17_reelectedW12 = 1 if districtW12 == 10678
replace GB17_reelectedW12 = 1 if districtW12 == 10679
replace GB17_reelectedW12 = 1 if districtW12 == 10680
replace GB17_reelectedW12 = 1 if districtW12 == 10681
replace GB17_reelectedW12 = 1 if districtW12 == 10682
replace GB17_reelectedW12 = 1 if districtW12 == 10683
replace GB17_reelectedW12 = 0 if districtW12 == 10684
replace GB17_reelectedW12 = 1 if districtW12 == 10685
replace GB17_reelectedW12 = 1 if districtW12 == 10686
replace GB17_reelectedW12 = 1 if districtW12 == 10687
replace GB17_reelectedW12 = 1 if districtW12 == 10688
replace GB17_reelectedW12 = 1 if districtW12 == 10689
replace GB17_reelectedW12 = 1 if districtW12 == 10690
replace GB17_reelectedW12 = 1 if districtW12 == 10691
replace GB17_reelectedW12 = 0 if districtW12 == 10692
replace GB17_reelectedW12 = 1 if districtW12 == 10693
replace GB17_reelectedW12 = 1 if districtW12 == 10694
replace GB17_reelectedW12 = 1 if districtW12 == 10695
replace GB17_reelectedW12 = 1 if districtW12 == 10696
replace GB17_reelectedW12 = 1 if districtW12 == 10697
replace GB17_reelectedW12 = 1 if districtW12 == 10698
replace GB17_reelectedW12 = 1 if districtW12 == 10699
replace GB17_reelectedW12 = 1 if districtW12 == 10700
replace GB17_reelectedW12 = 1 if districtW12 == 10701
replace GB17_reelectedW12 = 1 if districtW12 == 10702
replace GB17_reelectedW12 = 1 if districtW12 == 10703
replace GB17_reelectedW12 = 1 if districtW12 == 10704
replace GB17_reelectedW12 = 1 if districtW12 == 10705
replace GB17_reelectedW12 = 1 if districtW12 == 10706
replace GB17_reelectedW12 = 1 if districtW12 == 10707
replace GB17_reelectedW12 = 1 if districtW12 == 10708
replace GB17_reelectedW12 = 1 if districtW12 == 10709
replace GB17_reelectedW12 = 1 if districtW12 == 10710
replace GB17_reelectedW12 = 1 if districtW12 == 10711
replace GB17_reelectedW12 = 1 if districtW12 == 10712
replace GB17_reelectedW12 = 1 if districtW12 == 10713
replace GB17_reelectedW12 = 1 if districtW12 == 10714
replace GB17_reelectedW12 = 1 if districtW12 == 10715
replace GB17_reelectedW12 = 1 if districtW12 == 10716
replace GB17_reelectedW12 = 1 if districtW12 == 10717
replace GB17_reelectedW12 = 1 if districtW12 == 10718
replace GB17_reelectedW12 = 1 if districtW12 == 10719
replace GB17_reelectedW12 = 1 if districtW12 == 10720
replace GB17_reelectedW12 = 1 if districtW12 == 10721
replace GB17_reelectedW12 = 1 if districtW12 == 10722
replace GB17_reelectedW12 = 1 if districtW12 == 10723
replace GB17_reelectedW12 = 1 if districtW12 == 10724
replace GB17_reelectedW12 = 1 if districtW12 == 10725
replace GB17_reelectedW12 = 1 if districtW12 == 10726
replace GB17_reelectedW12 = 1 if districtW12 == 10727
replace GB17_reelectedW12 = 1 if districtW12 == 10728
replace GB17_reelectedW12 = 1 if districtW12 == 10729
replace GB17_reelectedW12 = 1 if districtW12 == 10730
replace GB17_reelectedW12 = 1 if districtW12 == 10731
replace GB17_reelectedW12 = 1 if districtW12 == 10732
replace GB17_reelectedW12 = 1 if districtW12 == 10733
replace GB17_reelectedW12 = 1 if districtW12 == 10734
replace GB17_reelectedW12 = 1 if districtW12 == 10735
replace GB17_reelectedW12 = 1 if districtW12 == 10736
replace GB17_reelectedW12 = 1 if districtW12 == 10737
replace GB17_reelectedW12 = 1 if districtW12 == 10738
replace GB17_reelectedW12 = 1 if districtW12 == 10739
replace GB17_reelectedW12 = 1 if districtW12 == 10740
replace GB17_reelectedW12 = 1 if districtW12 == 10741
replace GB17_reelectedW12 = 1 if districtW12 == 10742
replace GB17_reelectedW12 = 1 if districtW12 == 10743
replace GB17_reelectedW12 = 1 if districtW12 == 10744
replace GB17_reelectedW12 = 1 if districtW12 == 10745
replace GB17_reelectedW12 = 1 if districtW12 == 10746
replace GB17_reelectedW12 = 1 if districtW12 == 10747
replace GB17_reelectedW12 = 0 if districtW12 == 10748
replace GB17_reelectedW12 = 1 if districtW12 == 10749
replace GB17_reelectedW12 = 1 if districtW12 == 10750
replace GB17_reelectedW12 = 1 if districtW12 == 10751
replace GB17_reelectedW12 = 1 if districtW12 == 10752
replace GB17_reelectedW12 = 1 if districtW12 == 10753
replace GB17_reelectedW12 = 1 if districtW12 == 10754
replace GB17_reelectedW12 = 1 if districtW12 == 10755
replace GB17_reelectedW12 = 1 if districtW12 == 10756
replace GB17_reelectedW12 = 1 if districtW12 == 10757
replace GB17_reelectedW12 = 1 if districtW12 == 10758
replace GB17_reelectedW12 = 1 if districtW12 == 10759
replace GB17_reelectedW12 = 1 if districtW12 == 10760
replace GB17_reelectedW12 = 0 if districtW12 == 10761
replace GB17_reelectedW12 = 1 if districtW12 == 10762
replace GB17_reelectedW12 = 1 if districtW12 == 10763
replace GB17_reelectedW12 = 1 if districtW12 == 10764
replace GB17_reelectedW12 = 1 if districtW12 == 10765
replace GB17_reelectedW12 = 0 if districtW12 == 10766
replace GB17_reelectedW12 = 1 if districtW12 == 10767
replace GB17_reelectedW12 = 0 if districtW12 == 10768
replace GB17_reelectedW12 = 1 if districtW12 == 10769
replace GB17_reelectedW12 = 0 if districtW12 == 10770
replace GB17_reelectedW12 = 1 if districtW12 == 10771
replace GB17_reelectedW12 = 1 if districtW12 == 10772
replace GB17_reelectedW12 = 1 if districtW12 == 10773
replace GB17_reelectedW12 = 1 if districtW12 == 10774
replace GB17_reelectedW12 = 1 if districtW12 == 10775
replace GB17_reelectedW12 = 1 if districtW12 == 10776
replace GB17_reelectedW12 = 1 if districtW12 == 10777
replace GB17_reelectedW12 = 1 if districtW12 == 10778
replace GB17_reelectedW12 = 1 if districtW12 == 10779
replace GB17_reelectedW12 = 0 if districtW12 == 10780
replace GB17_reelectedW12 = 1 if districtW12 == 10781
replace GB17_reelectedW12 = 1 if districtW12 == 10782
replace GB17_reelectedW12 = 1 if districtW12 == 10783
replace GB17_reelectedW12 = 1 if districtW12 == 10784
replace GB17_reelectedW12 = 0 if districtW12 == 10785
replace GB17_reelectedW12 = 1 if districtW12 == 10786
replace GB17_reelectedW12 = 1 if districtW12 == 10787
replace GB17_reelectedW12 = 1 if districtW12 == 10788
replace GB17_reelectedW12 = 1 if districtW12 == 10789
replace GB17_reelectedW12 = 1 if districtW12 == 10790
replace GB17_reelectedW12 = 1 if districtW12 == 10791
replace GB17_reelectedW12 = 0 if districtW12 == 10792
replace GB17_reelectedW12 = 1 if districtW12 == 10793
replace GB17_reelectedW12 = 1 if districtW12 == 10794
replace GB17_reelectedW12 = 1 if districtW12 == 10795
replace GB17_reelectedW12 = 1 if districtW12 == 10796
replace GB17_reelectedW12 = 1 if districtW12 == 10797
replace GB17_reelectedW12 = 1 if districtW12 == 10798
replace GB17_reelectedW12 = 1 if districtW12 == 10799
replace GB17_reelectedW12 = 1 if districtW12 == 10800
replace GB17_reelectedW12 = 1 if districtW12 == 10801
replace GB17_reelectedW12 = 1 if districtW12 == 10802
replace GB17_reelectedW12 = 1 if districtW12 == 10803
replace GB17_reelectedW12 = 1 if districtW12 == 10804
replace GB17_reelectedW12 = 1 if districtW12 == 10805
replace GB17_reelectedW12 = 1 if districtW12 == 10806
replace GB17_reelectedW12 = 1 if districtW12 == 10807
replace GB17_reelectedW12 = 1 if districtW12 == 10808
replace GB17_reelectedW12 = 1 if districtW12 == 10809
replace GB17_reelectedW12 = 0 if districtW12 == 10810
replace GB17_reelectedW12 = 1 if districtW12 == 10811
replace GB17_reelectedW12 = 1 if districtW12 == 10812
replace GB17_reelectedW12 = 1 if districtW12 == 10813
replace GB17_reelectedW12 = 1 if districtW12 == 10814
replace GB17_reelectedW12 = 1 if districtW12 == 10815
replace GB17_reelectedW12 = 1 if districtW12 == 10816
replace GB17_reelectedW12 = 1 if districtW12 == 10817
replace GB17_reelectedW12 = 1 if districtW12 == 10818
replace GB17_reelectedW12 = 1 if districtW12 == 10819
replace GB17_reelectedW12 = 0 if districtW12 == 10820
replace GB17_reelectedW12 = 1 if districtW12 == 10821
replace GB17_reelectedW12 = 1 if districtW12 == 10822
replace GB17_reelectedW12 = 1 if districtW12 == 10823
replace GB17_reelectedW12 = 1 if districtW12 == 10824
replace GB17_reelectedW12 = 1 if districtW12 == 10825
replace GB17_reelectedW12 = 1 if districtW12 == 10826
replace GB17_reelectedW12 = 1 if districtW12 == 10827
replace GB17_reelectedW12 = 1 if districtW12 == 10828
replace GB17_reelectedW12 = 1 if districtW12 == 10829
replace GB17_reelectedW12 = 1 if districtW12 == 10830
replace GB17_reelectedW12 = 1 if districtW12 == 10831
replace GB17_reelectedW12 = 1 if districtW12 == 10832
replace GB17_reelectedW12 = 1 if districtW12 == 10833
replace GB17_reelectedW12 = 1 if districtW12 == 10834
replace GB17_reelectedW12 = 1 if districtW12 == 10835
replace GB17_reelectedW12 = 1 if districtW12 == 10836
replace GB17_reelectedW12 = 1 if districtW12 == 10837
replace GB17_reelectedW12 = 1 if districtW12 == 10838
replace GB17_reelectedW12 = 1 if districtW12 == 10839
replace GB17_reelectedW12 = 1 if districtW12 == 10840
replace GB17_reelectedW12 = 1 if districtW12 == 10841
replace GB17_reelectedW12 = 1 if districtW12 == 10842
replace GB17_reelectedW12 = 0 if districtW12 == 10843
replace GB17_reelectedW12 = 1 if districtW12 == 10844
replace GB17_reelectedW12 = 1 if districtW12 == 10845
replace GB17_reelectedW12 = 1 if districtW12 == 10846
replace GB17_reelectedW12 = 1 if districtW12 == 10847
replace GB17_reelectedW12 = 1 if districtW12 == 10848
replace GB17_reelectedW12 = 1 if districtW12 == 10849
replace GB17_reelectedW12 = 1 if districtW12 == 10850
replace GB17_reelectedW12 = 1 if districtW12 == 10851
replace GB17_reelectedW12 = 1 if districtW12 == 10852
replace GB17_reelectedW12 = 1 if districtW12 == 10853
replace GB17_reelectedW12 = 1 if districtW12 == 10854
replace GB17_reelectedW12 = 1 if districtW12 == 10855
replace GB17_reelectedW12 = 1 if districtW12 == 10856
replace GB17_reelectedW12 = 1 if districtW12 == 10857
replace GB17_reelectedW12 = 1 if districtW12 == 10858
replace GB17_reelectedW12 = 1 if districtW12 == 10859
replace GB17_reelectedW12 = 1 if districtW12 == 10860
replace GB17_reelectedW12 = 1 if districtW12 == 10861
replace GB17_reelectedW12 = 1 if districtW12 == 10862
replace GB17_reelectedW12 = 1 if districtW12 == 10863
replace GB17_reelectedW12 = 1 if districtW12 == 10864
replace GB17_reelectedW12 = 1 if districtW12 == 10865
replace GB17_reelectedW12 = 0 if districtW12 == 10866
replace GB17_reelectedW12 = 1 if districtW12 == 10867
replace GB17_reelectedW12 = 1 if districtW12 == 10868
replace GB17_reelectedW12 = 1 if districtW12 == 10869
replace GB17_reelectedW12 = 1 if districtW12 == 10870
replace GB17_reelectedW12 = 0 if districtW12 == 10871
replace GB17_reelectedW12 = 1 if districtW12 == 10872
replace GB17_reelectedW12 = 0 if districtW12 == 10873
replace GB17_reelectedW12 = 0 if districtW12 == 10874
replace GB17_reelectedW12 = 1 if districtW12 == 10875
replace GB17_reelectedW12 = 1 if districtW12 == 10876
replace GB17_reelectedW12 = 1 if districtW12 == 10877
replace GB17_reelectedW12 = 0 if districtW12 == 10878
replace GB17_reelectedW12 = 1 if districtW12 == 10879
replace GB17_reelectedW12 = 0 if districtW12 == 10880
replace GB17_reelectedW12 = 1 if districtW12 == 10881
replace GB17_reelectedW12 = 1 if districtW12 == 10882
replace GB17_reelectedW12 = 1 if districtW12 == 10883
replace GB17_reelectedW12 = 0 if districtW12 == 10884
replace GB17_reelectedW12 = 1 if districtW12 == 10885
replace GB17_reelectedW12 = 1 if districtW12 == 10886
replace GB17_reelectedW12 = 1 if districtW12 == 10887
replace GB17_reelectedW12 = 1 if districtW12 == 10888
replace GB17_reelectedW12 = 0 if districtW12 == 10889
replace GB17_reelectedW12 = 1 if districtW12 == 10890
replace GB17_reelectedW12 = 1 if districtW12 == 10891
replace GB17_reelectedW12 = 1 if districtW12 == 10892
replace GB17_reelectedW12 = 1 if districtW12 == 10893
replace GB17_reelectedW12 = 1 if districtW12 == 10894
replace GB17_reelectedW12 = 1 if districtW12 == 10895
replace GB17_reelectedW12 = 1 if districtW12 == 10896
replace GB17_reelectedW12 = 1 if districtW12 == 10897
replace GB17_reelectedW12 = 1 if districtW12 == 10898
replace GB17_reelectedW12 = 1 if districtW12 == 10899
replace GB17_reelectedW12 = 1 if districtW12 == 10900
replace GB17_reelectedW12 = 1 if districtW12 == 10901
replace GB17_reelectedW12 = 1 if districtW12 == 10902
replace GB17_reelectedW12 = 1 if districtW12 == 10903
replace GB17_reelectedW12 = 1 if districtW12 == 10904
replace GB17_reelectedW12 = 1 if districtW12 == 10905
replace GB17_reelectedW12 = 1 if districtW12 == 10906
replace GB17_reelectedW12 = 1 if districtW12 == 10907
replace GB17_reelectedW12 = 1 if districtW12 == 10908
replace GB17_reelectedW12 = 1 if districtW12 == 10909
replace GB17_reelectedW12 = 1 if districtW12 == 10910
replace GB17_reelectedW12 = 1 if districtW12 == 10911
replace GB17_reelectedW12 = 1 if districtW12 == 10912
replace GB17_reelectedW12 = 1 if districtW12 == 10913
replace GB17_reelectedW12 = 1 if districtW12 == 10914
replace GB17_reelectedW12 = 1 if districtW12 == 10915
replace GB17_reelectedW12 = 1 if districtW12 == 10916
replace GB17_reelectedW12 = 1 if districtW12 == 10917
replace GB17_reelectedW12 = 1 if districtW12 == 10918
replace GB17_reelectedW12 = 1 if districtW12 == 10919
replace GB17_reelectedW12 = 1 if districtW12 == 10920
replace GB17_reelectedW12 = 1 if districtW12 == 10921
replace GB17_reelectedW12 = 0 if districtW12 == 10922
replace GB17_reelectedW12 = 1 if districtW12 == 10923
replace GB17_reelectedW12 = 1 if districtW12 == 10924
replace GB17_reelectedW12 = 1 if districtW12 == 10925
replace GB17_reelectedW12 = 1 if districtW12 == 10926
replace GB17_reelectedW12 = 1 if districtW12 == 10927
replace GB17_reelectedW12 = 1 if districtW12 == 10928
replace GB17_reelectedW12 = 1 if districtW12 == 10929
replace GB17_reelectedW12 = 1 if districtW12 == 10930
replace GB17_reelectedW12 = 1 if districtW12 == 10931
replace GB17_reelectedW12 = 1 if districtW12 == 10932
replace GB17_reelectedW12 = 1 if districtW12 == 10933
replace GB17_reelectedW12 = 1 if districtW12 == 10934
replace GB17_reelectedW12 = 1 if districtW12 == 10935
replace GB17_reelectedW12 = 1 if districtW12 == 10936
replace GB17_reelectedW12 = 1 if districtW12 == 10937
replace GB17_reelectedW12 = 1 if districtW12 == 10938
replace GB17_reelectedW12 = 1 if districtW12 == 10939
replace GB17_reelectedW12 = 1 if districtW12 == 10940
replace GB17_reelectedW12 = 1 if districtW12 == 10941
replace GB17_reelectedW12 = 1 if districtW12 == 10942
replace GB17_reelectedW12 = 1 if districtW12 == 10943
replace GB17_reelectedW12 = 1 if districtW12 == 10944
replace GB17_reelectedW12 = 1 if districtW12 == 10945
replace GB17_reelectedW12 = 1 if districtW12 == 10946
replace GB17_reelectedW12 = 1 if districtW12 == 10947
replace GB17_reelectedW12 = 1 if districtW12 == 10948
replace GB17_reelectedW12 = 1 if districtW12 == 10949
replace GB17_reelectedW12 = 1 if districtW12 == 10950
replace GB17_reelectedW12 = 1 if districtW12 == 10951
replace GB17_reelectedW12 = 1 if districtW12 == 10952
replace GB17_reelectedW12 = 1 if districtW12 == 10953
replace GB17_reelectedW12 = 1 if districtW12 == 10954
replace GB17_reelectedW12 = 1 if districtW12 == 10955
replace GB17_reelectedW12 = 1 if districtW12 == 10956
replace GB17_reelectedW12 = 1 if districtW12 == 10957
replace GB17_reelectedW12 = 0 if districtW12 == 10958
replace GB17_reelectedW12 = 1 if districtW12 == 10959
replace GB17_reelectedW12 = 1 if districtW12 == 10960
replace GB17_reelectedW12 = 1 if districtW12 == 10961
replace GB17_reelectedW12 = 1 if districtW12 == 10962
replace GB17_reelectedW12 = 1 if districtW12 == 10963
replace GB17_reelectedW12 = 1 if districtW12 == 10964
replace GB17_reelectedW12 = 1 if districtW12 == 10965
replace GB17_reelectedW12 = 1 if districtW12 == 10966
replace GB17_reelectedW12 = 1 if districtW12 == 10967
replace GB17_reelectedW12 = 1 if districtW12 == 10968
replace GB17_reelectedW12 = 1 if districtW12 == 10969
replace GB17_reelectedW12 = 1 if districtW12 == 10970
replace GB17_reelectedW12 = 0 if districtW12 == 10971
replace GB17_reelectedW12 = 0 if districtW12 == 10972
replace GB17_reelectedW12 = 1 if districtW12 == 10973
replace GB17_reelectedW12 = 0 if districtW12 == 10974
replace GB17_reelectedW12 = 1 if districtW12 == 10975
replace GB17_reelectedW12 = 1 if districtW12 == 10976
replace GB17_reelectedW12 = 1 if districtW12 == 10977
replace GB17_reelectedW12 = 1 if districtW12 == 10978
replace GB17_reelectedW12 = 1 if districtW12 == 10979
replace GB17_reelectedW12 = 0 if districtW12 == 10980
replace GB17_reelectedW12 = 1 if districtW12 == 10981
replace GB17_reelectedW12 = 1 if districtW12 == 10982
replace GB17_reelectedW12 = 1 if districtW12 == 10983
replace GB17_reelectedW12 = 1 if districtW12 == 10984
replace GB17_reelectedW12 = 1 if districtW12 == 10985
replace GB17_reelectedW12 = 1 if districtW12 == 10986
replace GB17_reelectedW12 = 1 if districtW12 == 10987
replace GB17_reelectedW12 = 1 if districtW12 == 10988
replace GB17_reelectedW12 = 1 if districtW12 == 10989
replace GB17_reelectedW12 = 1 if districtW12 == 10990
replace GB17_reelectedW12 = 1 if districtW12 == 10991
replace GB17_reelectedW12 = 1 if districtW12 == 10992
replace GB17_reelectedW12 = 1 if districtW12 == 10993
replace GB17_reelectedW12 = 1 if districtW12 == 10994
replace GB17_reelectedW12 = 1 if districtW12 == 10995
replace GB17_reelectedW12 = 1 if districtW12 == 10996
replace GB17_reelectedW12 = 1 if districtW12 == 10997
replace GB17_reelectedW12 = 1 if districtW12 == 10998
replace GB17_reelectedW12 = 1 if districtW12 == 10999
replace GB17_reelectedW12 = 1 if districtW12 == 11000
replace GB17_reelectedW12 = 1 if districtW12 == 11001
replace GB17_reelectedW12 = 1 if districtW12 == 11002
replace GB17_reelectedW12 = 1 if districtW12 == 11003
replace GB17_reelectedW12 = 1 if districtW12 == 11004
replace GB17_reelectedW12 = 0 if districtW12 == 11005
replace GB17_reelectedW12 = 1 if districtW12 == 11006
replace GB17_reelectedW12 = 1 if districtW12 == 11007
replace GB17_reelectedW12 = 1 if districtW12 == 11008
replace GB17_reelectedW12 = 1 if districtW12 == 11009
replace GB17_reelectedW12 = 1 if districtW12 == 11010
replace GB17_reelectedW12 = 0 if districtW12 == 11011
replace GB17_reelectedW12 = 1 if districtW12 == 11012
replace GB17_reelectedW12 = 1 if districtW12 == 11013
replace GB17_reelectedW12 = 1 if districtW12 == 11014
replace GB17_reelectedW12 = 1 if districtW12 == 11015
replace GB17_reelectedW12 = 1 if districtW12 == 11016
replace GB17_reelectedW12 = 1 if districtW12 == 11017
replace GB17_reelectedW12 = 0 if districtW12 == 11018
replace GB17_reelectedW12 = 0 if districtW12 == 11019
replace GB17_reelectedW12 = 1 if districtW12 == 11020
replace GB17_reelectedW12 = 1 if districtW12 == 11021
replace GB17_reelectedW12 = 1 if districtW12 == 11022
replace GB17_reelectedW12 = 1 if districtW12 == 11023
replace GB17_reelectedW12 = 0 if districtW12 == 11024
replace GB17_reelectedW12 = 1 if districtW12 == 11025
replace GB17_reelectedW12 = 1 if districtW12 == 11026
replace GB17_reelectedW12 = 1 if districtW12 == 11027
replace GB17_reelectedW12 = 1 if districtW12 == 11028
replace GB17_reelectedW12 = 1 if districtW12 == 11029
replace GB17_reelectedW12 = 1 if districtW12 == 11030
replace GB17_reelectedW12 = 1 if districtW12 == 11031
replace GB17_reelectedW12 = 1 if districtW12 == 11032
replace GB17_reelectedW12 = 1 if districtW12 == 11033
replace GB17_reelectedW12 = 1 if districtW12 == 11034
replace GB17_reelectedW12 = 1 if districtW12 == 11035
replace GB17_reelectedW12 = 1 if districtW12 == 11036
replace GB17_reelectedW12 = 1 if districtW12 == 11037
replace GB17_reelectedW12 = 1 if districtW12 == 11038
replace GB17_reelectedW12 = 1 if districtW12 == 11039
replace GB17_reelectedW12 = 1 if districtW12 == 11040
replace GB17_reelectedW12 = 1 if districtW12 == 11041
replace GB17_reelectedW12 = 1 if districtW12 == 11042
replace GB17_reelectedW12 = 1 if districtW12 == 11043
replace GB17_reelectedW12 = 1 if districtW12 == 11044
replace GB17_reelectedW12 = 1 if districtW12 == 11045
replace GB17_reelectedW12 = 1 if districtW12 == 11046
replace GB17_reelectedW12 = 1 if districtW12 == 11047
replace GB17_reelectedW12 = 1 if districtW12 == 11048
replace GB17_reelectedW12 = 1 if districtW12 == 11049
replace GB17_reelectedW12 = 1 if districtW12 == 11050
replace GB17_reelectedW12 = 1 if districtW12 == 11051
replace GB17_reelectedW12 = 1 if districtW12 == 11052
replace GB17_reelectedW12 = 1 if districtW12 == 11053
replace GB17_reelectedW12 = 1 if districtW12 == 11054
replace GB17_reelectedW12 = 1 if districtW12 == 11055
replace GB17_reelectedW12 = 1 if districtW12 == 11056
replace GB17_reelectedW12 = 1 if districtW12 == 11057
replace GB17_reelectedW12 = 1 if districtW12 == 11058
replace GB17_reelectedW12 = 1 if districtW12 == 11059
replace GB17_reelectedW12 = 1 if districtW12 == 11060
replace GB17_reelectedW12 = 1 if districtW12 == 11061
replace GB17_reelectedW12 = 1 if districtW12 == 11062
replace GB17_reelectedW12 = 1 if districtW12 == 40001
replace GB17_reelectedW12 = 1 if districtW12 == 40002
replace GB17_reelectedW12 = 1 if districtW12 == 40003
replace GB17_reelectedW12 = 1 if districtW12 == 40004
replace GB17_reelectedW12 = 1 if districtW12 == 40005
replace GB17_reelectedW12 = 1 if districtW12 == 40006
replace GB17_reelectedW12 = 1 if districtW12 == 40007
replace GB17_reelectedW12 = 1 if districtW12 == 40008
replace GB17_reelectedW12 = 1 if districtW12 == 40009
replace GB17_reelectedW12 = 1 if districtW12 == 40010
replace GB17_reelectedW12 = 1 if districtW12 == 40011
replace GB17_reelectedW12 = 1 if districtW12 == 40012
replace GB17_reelectedW12 = 1 if districtW12 == 40013
replace GB17_reelectedW12 = 1 if districtW12 == 40014
replace GB17_reelectedW12 = 1 if districtW12 == 40015
replace GB17_reelectedW12 = 1 if districtW12 == 40016
replace GB17_reelectedW12 = 1 if districtW12 == 40017
replace GB17_reelectedW12 = 1 if districtW12 == 40018
replace GB17_reelectedW12 = 1 if districtW12 == 20001
replace GB17_reelectedW12 = 0 if districtW12 == 20002
replace GB17_reelectedW12 = 1 if districtW12 == 20003
replace GB17_reelectedW12 = 0 if districtW12 == 20004
replace GB17_reelectedW12 = 1 if districtW12 == 20005
replace GB17_reelectedW12 = 0 if districtW12 == 20006
replace GB17_reelectedW12 = 0 if districtW12 == 20007
replace GB17_reelectedW12 = 0 if districtW12 == 20008
replace GB17_reelectedW12 = 0 if districtW12 == 20009
replace GB17_reelectedW12 = 1 if districtW12 == 20010
replace GB17_reelectedW12 = 0 if districtW12 == 20011
replace GB17_reelectedW12 = 1 if districtW12 == 20012
replace GB17_reelectedW12 = 0 if districtW12 == 20013
replace GB17_reelectedW12 = 1 if districtW12 == 20014
replace GB17_reelectedW12 = 1 if districtW12 == 20015
replace GB17_reelectedW12 = 1 if districtW12 == 20016
replace GB17_reelectedW12 = 1 if districtW12 == 20017
replace GB17_reelectedW12 = 0 if districtW12 == 20018
replace GB17_reelectedW12 = 1 if districtW12 == 20019
replace GB17_reelectedW12 = 0 if districtW12 == 20020
replace GB17_reelectedW12 = 0 if districtW12 == 20021
replace GB17_reelectedW12 = 1 if districtW12 == 20022
replace GB17_reelectedW12 = 1 if districtW12 == 20023
replace GB17_reelectedW12 = 1 if districtW12 == 20024
replace GB17_reelectedW12 = 1 if districtW12 == 20025
replace GB17_reelectedW12 = 0 if districtW12 == 20026
replace GB17_reelectedW12 = 1 if districtW12 == 20027
replace GB17_reelectedW12 = 1 if districtW12 == 20028
replace GB17_reelectedW12 = 1 if districtW12 == 20029
replace GB17_reelectedW12 = 1 if districtW12 == 20030
replace GB17_reelectedW12 = 1 if districtW12 == 20031
replace GB17_reelectedW12 = 0 if districtW12 == 20032
replace GB17_reelectedW12 = 1 if districtW12 == 20033
replace GB17_reelectedW12 = 1 if districtW12 == 20034
replace GB17_reelectedW12 = 1 if districtW12 == 20035
replace GB17_reelectedW12 = 1 if districtW12 == 20036
replace GB17_reelectedW12 = 0 if districtW12 == 20037
replace GB17_reelectedW12 = 1 if districtW12 == 20038
replace GB17_reelectedW12 = 1 if districtW12 == 20039
replace GB17_reelectedW12 = 1 if districtW12 == 20040
replace GB17_reelectedW12 = 0 if districtW12 == 20041
replace GB17_reelectedW12 = 1 if districtW12 == 20042
replace GB17_reelectedW12 = 1 if districtW12 == 20043
replace GB17_reelectedW12 = 1 if districtW12 == 20044
replace GB17_reelectedW12 = 0 if districtW12 == 20045
replace GB17_reelectedW12 = 0 if districtW12 == 20046
replace GB17_reelectedW12 = 1 if districtW12 == 20047
replace GB17_reelectedW12 = 1 if districtW12 == 20048
replace GB17_reelectedW12 = 1 if districtW12 == 20049
replace GB17_reelectedW12 = 0 if districtW12 == 20050
replace GB17_reelectedW12 = 1 if districtW12 == 20051
replace GB17_reelectedW12 = 1 if districtW12 == 20052
replace GB17_reelectedW12 = 1 if districtW12 == 20053
replace GB17_reelectedW12 = 1 if districtW12 == 20054
replace GB17_reelectedW12 = 1 if districtW12 == 20055
replace GB17_reelectedW12 = 0 if districtW12 == 20056
replace GB17_reelectedW12 = 0 if districtW12 == 20057
replace GB17_reelectedW12 = 0 if districtW12 == 20058
replace GB17_reelectedW12 = 1 if districtW12 == 20059
replace GB17_reelectedW12 = 1 if districtW12 == 30041
replace GB17_reelectedW12 = 1 if districtW12 == 30042
replace GB17_reelectedW12 = 1 if districtW12 == 30043
replace GB17_reelectedW12 = 1 if districtW12 == 30044
replace GB17_reelectedW12 = 1 if districtW12 == 30045
replace GB17_reelectedW12 = 0 if districtW12 == 30046
replace GB17_reelectedW12 = 1 if districtW12 == 30047
replace GB17_reelectedW12 = 1 if districtW12 == 30048
replace GB17_reelectedW12 = 1 if districtW12 == 30049
replace GB17_reelectedW12 = 1 if districtW12 == 30050
replace GB17_reelectedW12 = 0 if districtW12 == 30051
replace GB17_reelectedW12 = 1 if districtW12 == 30052
replace GB17_reelectedW12 = 1 if districtW12 == 30053
replace GB17_reelectedW12 = 1 if districtW12 == 30054
replace GB17_reelectedW12 = 1 if districtW12 == 30055
replace GB17_reelectedW12 = 1 if districtW12 == 30056
replace GB17_reelectedW12 = 1 if districtW12 == 30057
replace GB17_reelectedW12 = 1 if districtW12 == 30058
replace GB17_reelectedW12 = 1 if districtW12 == 30059
replace GB17_reelectedW12 = 0 if districtW12 == 30060
replace GB17_reelectedW12 = 1 if districtW12 == 30061
replace GB17_reelectedW12 = 1 if districtW12 == 30062
replace GB17_reelectedW12 = 1 if districtW12 == 30063
replace GB17_reelectedW12 = 0 if districtW12 == 30064
replace GB17_reelectedW12 = 1 if districtW12 == 30065
replace GB17_reelectedW12 = 1 if districtW12 == 30066
replace GB17_reelectedW12 = 1 if districtW12 == 30067
replace GB17_reelectedW12 = 1 if districtW12 == 30068
replace GB17_reelectedW12 = 0 if districtW12 == 30069
replace GB17_reelectedW12 = 1 if districtW12 == 30070
replace GB17_reelectedW12 = 1 if districtW12 == 30071
replace GB17_reelectedW12 = 1 if districtW12 == 30072
replace GB17_reelectedW12 = 1 if districtW12 == 30073
replace GB17_reelectedW12 = 1 if districtW12 == 30074
replace GB17_reelectedW12 = 1 if districtW12 == 30075
replace GB17_reelectedW12 = 1 if districtW12 == 30076
replace GB17_reelectedW12 = 1 if districtW12 == 30077
replace GB17_reelectedW12 = 1 if districtW12 == 30078
replace GB17_reelectedW12 = 1 if districtW12 == 30079
replace GB17_reelectedW12 = 1 if districtW12 == 30080


******************************************************
** INCUMBENT PARTY REELECTED: 2019 GENERAL ELECTION **
******************************************************

gen GB19_reelectedW17 = .

replace GB19_reelectedW17 = 1 if districtW17 == 10530
replace GB19_reelectedW17 = 1 if districtW17 == 10531
replace GB19_reelectedW17 = 1 if districtW17 == 10532
replace GB19_reelectedW17 = 1 if districtW17 == 10533
replace GB19_reelectedW17 = 1 if districtW17 == 10534
replace GB19_reelectedW17 = 0 if districtW17 == 10535
replace GB19_reelectedW17 = 1 if districtW17 == 10536
replace GB19_reelectedW17 = 1 if districtW17 == 10537
replace GB19_reelectedW17 = 1 if districtW17 == 10538
replace GB19_reelectedW17 = 1 if districtW17 == 10539
replace GB19_reelectedW17 = 1 if districtW17 == 10540
replace GB19_reelectedW17 = 1 if districtW17 == 10541
replace GB19_reelectedW17 = 1 if districtW17 == 10542
replace GB19_reelectedW17 = 0 if districtW17 == 10543
replace GB19_reelectedW17 = 1 if districtW17 == 10544
replace GB19_reelectedW17 = 1 if districtW17 == 10545
replace GB19_reelectedW17 = 0 if districtW17 == 10546
replace GB19_reelectedW17 = 1 if districtW17 == 10547
replace GB19_reelectedW17 = 1 if districtW17 == 10548
replace GB19_reelectedW17 = 1 if districtW17 == 10549
replace GB19_reelectedW17 = 1 if districtW17 == 10550
replace GB19_reelectedW17 = 1 if districtW17 == 10551
replace GB19_reelectedW17 = 1 if districtW17 == 10552
replace GB19_reelectedW17 = 1 if districtW17 == 10553
replace GB19_reelectedW17 = 1 if districtW17 == 10554
replace GB19_reelectedW17 = 1 if districtW17 == 10555
replace GB19_reelectedW17 = 1 if districtW17 == 10556
replace GB19_reelectedW17 = 1 if districtW17 == 10557
replace GB19_reelectedW17 = 1 if districtW17 == 10558
replace GB19_reelectedW17 = 1 if districtW17 == 10559
replace GB19_reelectedW17 = 1 if districtW17 == 10560
replace GB19_reelectedW17 = 1 if districtW17 == 10561
replace GB19_reelectedW17 = 1 if districtW17 == 10562
replace GB19_reelectedW17 = 1 if districtW17 == 10563
replace GB19_reelectedW17 = 1 if districtW17 == 10564
replace GB19_reelectedW17 = 0 if districtW17 == 10565
replace GB19_reelectedW17 = 1 if districtW17 == 10566
replace GB19_reelectedW17 = 1 if districtW17 == 10567
replace GB19_reelectedW17 = 1 if districtW17 == 10568
replace GB19_reelectedW17 = 0 if districtW17 == 10569
replace GB19_reelectedW17 = 1 if districtW17 == 10570
replace GB19_reelectedW17 = 1 if districtW17 == 10571
replace GB19_reelectedW17 = 1 if districtW17 == 10572
replace GB19_reelectedW17 = 0 if districtW17 == 10573
replace GB19_reelectedW17 = 1 if districtW17 == 10574
replace GB19_reelectedW17 = 0 if districtW17 == 10575
replace GB19_reelectedW17 = 1 if districtW17 == 10576
replace GB19_reelectedW17 = 0 if districtW17 == 10577
replace GB19_reelectedW17 = 0 if districtW17 == 10578
replace GB19_reelectedW17 = 1 if districtW17 == 10579
replace GB19_reelectedW17 = 1 if districtW17 == 10580
replace GB19_reelectedW17 = 1 if districtW17 == 10581
replace GB19_reelectedW17 = 1 if districtW17 == 10582
replace GB19_reelectedW17 = 1 if districtW17 == 10583
replace GB19_reelectedW17 = 1 if districtW17 == 10584
replace GB19_reelectedW17 = 1 if districtW17 == 10585
replace GB19_reelectedW17 = 1 if districtW17 == 10586
replace GB19_reelectedW17 = 1 if districtW17 == 10587
replace GB19_reelectedW17 = 1 if districtW17 == 10588
replace GB19_reelectedW17 = 1 if districtW17 == 10589
replace GB19_reelectedW17 = 1 if districtW17 == 10590
replace GB19_reelectedW17 = 1 if districtW17 == 10591
replace GB19_reelectedW17 = 1 if districtW17 == 10592
replace GB19_reelectedW17 = 1 if districtW17 == 10593
replace GB19_reelectedW17 = 1 if districtW17 == 10594
replace GB19_reelectedW17 = 1 if districtW17 == 10595
replace GB19_reelectedW17 = 1 if districtW17 == 10596
replace GB19_reelectedW17 = 1 if districtW17 == 10597
replace GB19_reelectedW17 = 1 if districtW17 == 10598
replace GB19_reelectedW17 = 1 if districtW17 == 10599
replace GB19_reelectedW17 = 1 if districtW17 == 10600
replace GB19_reelectedW17 = 1 if districtW17 == 10601
replace GB19_reelectedW17 = 1 if districtW17 == 10602
replace GB19_reelectedW17 = 1 if districtW17 == 10603
replace GB19_reelectedW17 = 1 if districtW17 == 10604
replace GB19_reelectedW17 = 1 if districtW17 == 10605
replace GB19_reelectedW17 = 1 if districtW17 == 10606
replace GB19_reelectedW17 = 1 if districtW17 == 10607
replace GB19_reelectedW17 = 0 if districtW17 == 10608
replace GB19_reelectedW17 = 0 if districtW17 == 10609
replace GB19_reelectedW17 = 1 if districtW17 == 10610
replace GB19_reelectedW17 = 0 if districtW17 == 10611
replace GB19_reelectedW17 = 0 if districtW17 == 10612
replace GB19_reelectedW17 = 1 if districtW17 == 10613
replace GB19_reelectedW17 = 1 if districtW17 == 10614
replace GB19_reelectedW17 = 1 if districtW17 == 10615
replace GB19_reelectedW17 = 1 if districtW17 == 10616
replace GB19_reelectedW17 = 1 if districtW17 == 10617
replace GB19_reelectedW17 = 1 if districtW17 == 10618
replace GB19_reelectedW17 = 1 if districtW17 == 10619
replace GB19_reelectedW17 = 1 if districtW17 == 10620
replace GB19_reelectedW17 = 0 if districtW17 == 10621
replace GB19_reelectedW17 = 1 if districtW17 == 10622
replace GB19_reelectedW17 = 1 if districtW17 == 10623
replace GB19_reelectedW17 = 1 if districtW17 == 10624
replace GB19_reelectedW17 = 1 if districtW17 == 10625
replace GB19_reelectedW17 = 1 if districtW17 == 10626
replace GB19_reelectedW17 = 1 if districtW17 == 10627
replace GB19_reelectedW17 = 1 if districtW17 == 10628
replace GB19_reelectedW17 = 1 if districtW17 == 10629
replace GB19_reelectedW17 = 1 if districtW17 == 10630
replace GB19_reelectedW17 = 1 if districtW17 == 10631
replace GB19_reelectedW17 = 1 if districtW17 == 10632
replace GB19_reelectedW17 = 1 if districtW17 == 10633
replace GB19_reelectedW17 = 1 if districtW17 == 10634
replace GB19_reelectedW17 = 1 if districtW17 == 10635
replace GB19_reelectedW17 = 1 if districtW17 == 10636
replace GB19_reelectedW17 = 0 if districtW17 == 10637
replace GB19_reelectedW17 = 1 if districtW17 == 10638
replace GB19_reelectedW17 = 1 if districtW17 == 10639
replace GB19_reelectedW17 = 1 if districtW17 == 10640
replace GB19_reelectedW17 = 1 if districtW17 == 10641
replace GB19_reelectedW17 = 1 if districtW17 == 10642
replace GB19_reelectedW17 = 1 if districtW17 == 10643
replace GB19_reelectedW17 = 1 if districtW17 == 10644
replace GB19_reelectedW17 = 0 if districtW17 == 10645
replace GB19_reelectedW17 = 1 if districtW17 == 10646
replace GB19_reelectedW17 = 1 if districtW17 == 10647
replace GB19_reelectedW17 = 1 if districtW17 == 10648
replace GB19_reelectedW17 = 1 if districtW17 == 10649
replace GB19_reelectedW17 = 1 if districtW17 == 10650
replace GB19_reelectedW17 = 1 if districtW17 == 10651
replace GB19_reelectedW17 = 1 if districtW17 == 10652
replace GB19_reelectedW17 = 0 if districtW17 == 10653
replace GB19_reelectedW17 = 1 if districtW17 == 10654
replace GB19_reelectedW17 = 1 if districtW17 == 10655
replace GB19_reelectedW17 = 1 if districtW17 == 10656
replace GB19_reelectedW17 = 1 if districtW17 == 10657
replace GB19_reelectedW17 = 0 if districtW17 == 10658
replace GB19_reelectedW17 = 1 if districtW17 == 10659
replace GB19_reelectedW17 = 1 if districtW17 == 10660
replace GB19_reelectedW17 = 1 if districtW17 == 10661
replace GB19_reelectedW17 = 0 if districtW17 == 10662
replace GB19_reelectedW17 = 1 if districtW17 == 10663
replace GB19_reelectedW17 = 1 if districtW17 == 10664
replace GB19_reelectedW17 = 1 if districtW17 == 10665
replace GB19_reelectedW17 = 0 if districtW17 == 10666
replace GB19_reelectedW17 = 0 if districtW17 == 10667
replace GB19_reelectedW17 = 1 if districtW17 == 10668
replace GB19_reelectedW17 = 1 if districtW17 == 10669
replace GB19_reelectedW17 = 1 if districtW17 == 10670
replace GB19_reelectedW17 = 0 if districtW17 == 10671
replace GB19_reelectedW17 = 1 if districtW17 == 10672
replace GB19_reelectedW17 = 1 if districtW17 == 10673
replace GB19_reelectedW17 = 1 if districtW17 == 10674
replace GB19_reelectedW17 = 0 if districtW17 == 10675
replace GB19_reelectedW17 = 1 if districtW17 == 10676
replace GB19_reelectedW17 = 1 if districtW17 == 10677
replace GB19_reelectedW17 = 1 if districtW17 == 10678
replace GB19_reelectedW17 = 1 if districtW17 == 10679
replace GB19_reelectedW17 = 1 if districtW17 == 10680
replace GB19_reelectedW17 = 1 if districtW17 == 10681
replace GB19_reelectedW17 = 1 if districtW17 == 10682
replace GB19_reelectedW17 = 1 if districtW17 == 10683
replace GB19_reelectedW17 = 0 if districtW17 == 10684
replace GB19_reelectedW17 = 1 if districtW17 == 10685
replace GB19_reelectedW17 = 1 if districtW17 == 10686
replace GB19_reelectedW17 = 1 if districtW17 == 10687
replace GB19_reelectedW17 = 1 if districtW17 == 10688
replace GB19_reelectedW17 = 1 if districtW17 == 10689
replace GB19_reelectedW17 = 1 if districtW17 == 10690
replace GB19_reelectedW17 = 1 if districtW17 == 10691
replace GB19_reelectedW17 = 1 if districtW17 == 10692
replace GB19_reelectedW17 = 1 if districtW17 == 10693
replace GB19_reelectedW17 = 1 if districtW17 == 10694
replace GB19_reelectedW17 = 1 if districtW17 == 10695
replace GB19_reelectedW17 = 1 if districtW17 == 10696
replace GB19_reelectedW17 = 1 if districtW17 == 10697
replace GB19_reelectedW17 = 1 if districtW17 == 10698
replace GB19_reelectedW17 = 1 if districtW17 == 10699
replace GB19_reelectedW17 = 1 if districtW17 == 10700
replace GB19_reelectedW17 = 1 if districtW17 == 10701
replace GB19_reelectedW17 = 1 if districtW17 == 10702
replace GB19_reelectedW17 = 1 if districtW17 == 10703
replace GB19_reelectedW17 = 1 if districtW17 == 10704
replace GB19_reelectedW17 = 1 if districtW17 == 10705
replace GB19_reelectedW17 = 1 if districtW17 == 10706
replace GB19_reelectedW17 = 1 if districtW17 == 10707
replace GB19_reelectedW17 = 1 if districtW17 == 10708
replace GB19_reelectedW17 = 1 if districtW17 == 10709
replace GB19_reelectedW17 = 0 if districtW17 == 10710
replace GB19_reelectedW17 = 1 if districtW17 == 10711
replace GB19_reelectedW17 = 1 if districtW17 == 10712
replace GB19_reelectedW17 = 1 if districtW17 == 10713
replace GB19_reelectedW17 = 1 if districtW17 == 10714
replace GB19_reelectedW17 = 1 if districtW17 == 10715
replace GB19_reelectedW17 = 0 if districtW17 == 10716
replace GB19_reelectedW17 = 1 if districtW17 == 10717
replace GB19_reelectedW17 = 1 if districtW17 == 10718
replace GB19_reelectedW17 = 1 if districtW17 == 10719
replace GB19_reelectedW17 = 1 if districtW17 == 10720
replace GB19_reelectedW17 = 1 if districtW17 == 10721
replace GB19_reelectedW17 = 1 if districtW17 == 10722
replace GB19_reelectedW17 = 1 if districtW17 == 10723
replace GB19_reelectedW17 = 1 if districtW17 == 10724
replace GB19_reelectedW17 = 1 if districtW17 == 10725
replace GB19_reelectedW17 = 1 if districtW17 == 10726
replace GB19_reelectedW17 = 1 if districtW17 == 10727
replace GB19_reelectedW17 = 1 if districtW17 == 10728
replace GB19_reelectedW17 = 1 if districtW17 == 10729
replace GB19_reelectedW17 = 1 if districtW17 == 10730
replace GB19_reelectedW17 = 1 if districtW17 == 10731
replace GB19_reelectedW17 = 1 if districtW17 == 10732
replace GB19_reelectedW17 = 1 if districtW17 == 10733
replace GB19_reelectedW17 = 1 if districtW17 == 10734
replace GB19_reelectedW17 = 1 if districtW17 == 10735
replace GB19_reelectedW17 = 1 if districtW17 == 10736
replace GB19_reelectedW17 = 1 if districtW17 == 10737
replace GB19_reelectedW17 = 1 if districtW17 == 10738
replace GB19_reelectedW17 = 1 if districtW17 == 10739
replace GB19_reelectedW17 = 1 if districtW17 == 10740
replace GB19_reelectedW17 = 1 if districtW17 == 10741
replace GB19_reelectedW17 = 1 if districtW17 == 10742
replace GB19_reelectedW17 = 1 if districtW17 == 10743
replace GB19_reelectedW17 = 1 if districtW17 == 10744
replace GB19_reelectedW17 = 1 if districtW17 == 10745
replace GB19_reelectedW17 = 1 if districtW17 == 10746
replace GB19_reelectedW17 = 0 if districtW17 == 10747
replace GB19_reelectedW17 = 0 if districtW17 == 10748
replace GB19_reelectedW17 = 1 if districtW17 == 10749
replace GB19_reelectedW17 = 1 if districtW17 == 10750
replace GB19_reelectedW17 = 1 if districtW17 == 10751
replace GB19_reelectedW17 = 1 if districtW17 == 10752
replace GB19_reelectedW17 = 1 if districtW17 == 10753
replace GB19_reelectedW17 = 1 if districtW17 == 10754
replace GB19_reelectedW17 = 1 if districtW17 == 10755
replace GB19_reelectedW17 = 1 if districtW17 == 10756
replace GB19_reelectedW17 = 1 if districtW17 == 10757
replace GB19_reelectedW17 = 0 if districtW17 == 10758
replace GB19_reelectedW17 = 1 if districtW17 == 10759
replace GB19_reelectedW17 = 0 if districtW17 == 10760
replace GB19_reelectedW17 = 0 if districtW17 == 10761
replace GB19_reelectedW17 = 1 if districtW17 == 10762
replace GB19_reelectedW17 = 1 if districtW17 == 10763
replace GB19_reelectedW17 = 1 if districtW17 == 10764
replace GB19_reelectedW17 = 1 if districtW17 == 10765
replace GB19_reelectedW17 = 0 if districtW17 == 10766
replace GB19_reelectedW17 = 1 if districtW17 == 10767
replace GB19_reelectedW17 = 0 if districtW17 == 10768
replace GB19_reelectedW17 = 1 if districtW17 == 10769
replace GB19_reelectedW17 = 1 if districtW17 == 10770
replace GB19_reelectedW17 = 1 if districtW17 == 10771
replace GB19_reelectedW17 = 1 if districtW17 == 10772
replace GB19_reelectedW17 = 1 if districtW17 == 10773
replace GB19_reelectedW17 = 1 if districtW17 == 10774
replace GB19_reelectedW17 = 1 if districtW17 == 10775
replace GB19_reelectedW17 = 1 if districtW17 == 10776
replace GB19_reelectedW17 = 1 if districtW17 == 10777
replace GB19_reelectedW17 = 1 if districtW17 == 10778
replace GB19_reelectedW17 = 1 if districtW17 == 10779
replace GB19_reelectedW17 = 1 if districtW17 == 10780
replace GB19_reelectedW17 = 1 if districtW17 == 10781
replace GB19_reelectedW17 = 1 if districtW17 == 10782
replace GB19_reelectedW17 = 1 if districtW17 == 10783
replace GB19_reelectedW17 = 1 if districtW17 == 10784
replace GB19_reelectedW17 = 0 if districtW17 == 10785
replace GB19_reelectedW17 = 1 if districtW17 == 10786
replace GB19_reelectedW17 = 1 if districtW17 == 10787
replace GB19_reelectedW17 = 1 if districtW17 == 10788
replace GB19_reelectedW17 = 1 if districtW17 == 10789
replace GB19_reelectedW17 = 1 if districtW17 == 10790
replace GB19_reelectedW17 = 1 if districtW17 == 10791
replace GB19_reelectedW17 = 0 if districtW17 == 10792
replace GB19_reelectedW17 = 0 if districtW17 == 10793
replace GB19_reelectedW17 = 1 if districtW17 == 10794
replace GB19_reelectedW17 = 0 if districtW17 == 10795
replace GB19_reelectedW17 = 0 if districtW17 == 10796
replace GB19_reelectedW17 = 1 if districtW17 == 10797
replace GB19_reelectedW17 = 1 if districtW17 == 10798
replace GB19_reelectedW17 = 1 if districtW17 == 10799
replace GB19_reelectedW17 = 1 if districtW17 == 10800
replace GB19_reelectedW17 = 0 if districtW17 == 10801
replace GB19_reelectedW17 = 1 if districtW17 == 10802
replace GB19_reelectedW17 = 1 if districtW17 == 10803
replace GB19_reelectedW17 = 1 if districtW17 == 10804
replace GB19_reelectedW17 = 1 if districtW17 == 10805
replace GB19_reelectedW17 = 1 if districtW17 == 10806
replace GB19_reelectedW17 = 1 if districtW17 == 10807
replace GB19_reelectedW17 = 1 if districtW17 == 10808
replace GB19_reelectedW17 = 1 if districtW17 == 10809
replace GB19_reelectedW17 = 1 if districtW17 == 10810
replace GB19_reelectedW17 = 1 if districtW17 == 10811
replace GB19_reelectedW17 = 1 if districtW17 == 10812
replace GB19_reelectedW17 = 1 if districtW17 == 10813
replace GB19_reelectedW17 = 1 if districtW17 == 10814
replace GB19_reelectedW17 = 1 if districtW17 == 10815
replace GB19_reelectedW17 = 1 if districtW17 == 10816
replace GB19_reelectedW17 = 1 if districtW17 == 10817
replace GB19_reelectedW17 = 1 if districtW17 == 10818
replace GB19_reelectedW17 = 1 if districtW17 == 10819
replace GB19_reelectedW17 = 1 if districtW17 == 10820
replace GB19_reelectedW17 = 1 if districtW17 == 10821
replace GB19_reelectedW17 = 1 if districtW17 == 10822
replace GB19_reelectedW17 = 1 if districtW17 == 10823
replace GB19_reelectedW17 = 1 if districtW17 == 10824
replace GB19_reelectedW17 = 1 if districtW17 == 10825
replace GB19_reelectedW17 = 1 if districtW17 == 10826
replace GB19_reelectedW17 = 1 if districtW17 == 10827
replace GB19_reelectedW17 = 1 if districtW17 == 10828
replace GB19_reelectedW17 = 1 if districtW17 == 10829
replace GB19_reelectedW17 = 1 if districtW17 == 10830
replace GB19_reelectedW17 = 1 if districtW17 == 10831
replace GB19_reelectedW17 = 1 if districtW17 == 10832
replace GB19_reelectedW17 = 1 if districtW17 == 10833
replace GB19_reelectedW17 = 0 if districtW17 == 10834
replace GB19_reelectedW17 = 1 if districtW17 == 10835
replace GB19_reelectedW17 = 1 if districtW17 == 10836
replace GB19_reelectedW17 = 1 if districtW17 == 10837
replace GB19_reelectedW17 = 1 if districtW17 == 10838
replace GB19_reelectedW17 = 1 if districtW17 == 10839
replace GB19_reelectedW17 = 1 if districtW17 == 10840
replace GB19_reelectedW17 = 1 if districtW17 == 10841
replace GB19_reelectedW17 = 1 if districtW17 == 10842
replace GB19_reelectedW17 = 1 if districtW17 == 10843
replace GB19_reelectedW17 = 1 if districtW17 == 10844
replace GB19_reelectedW17 = 1 if districtW17 == 10845
replace GB19_reelectedW17 = 1 if districtW17 == 10846
replace GB19_reelectedW17 = 1 if districtW17 == 10847
replace GB19_reelectedW17 = 0 if districtW17 == 10848
replace GB19_reelectedW17 = 1 if districtW17 == 10849
replace GB19_reelectedW17 = 1 if districtW17 == 10850
replace GB19_reelectedW17 = 1 if districtW17 == 10851
replace GB19_reelectedW17 = 1 if districtW17 == 10852
replace GB19_reelectedW17 = 1 if districtW17 == 10853
replace GB19_reelectedW17 = 1 if districtW17 == 10854
replace GB19_reelectedW17 = 1 if districtW17 == 10855
replace GB19_reelectedW17 = 0 if districtW17 == 10856
replace GB19_reelectedW17 = 1 if districtW17 == 10857
replace GB19_reelectedW17 = 1 if districtW17 == 10858
replace GB19_reelectedW17 = 1 if districtW17 == 10859
replace GB19_reelectedW17 = 1 if districtW17 == 10860
replace GB19_reelectedW17 = 1 if districtW17 == 10861
replace GB19_reelectedW17 = 1 if districtW17 == 10862
replace GB19_reelectedW17 = 1 if districtW17 == 10863
replace GB19_reelectedW17 = 1 if districtW17 == 10864
replace GB19_reelectedW17 = 0 if districtW17 == 10865
replace GB19_reelectedW17 = 1 if districtW17 == 10866
replace GB19_reelectedW17 = 1 if districtW17 == 10867
replace GB19_reelectedW17 = 1 if districtW17 == 10868
replace GB19_reelectedW17 = 1 if districtW17 == 10869
replace GB19_reelectedW17 = 1 if districtW17 == 10870
replace GB19_reelectedW17 = 1 if districtW17 == 10871
replace GB19_reelectedW17 = 1 if districtW17 == 10872
replace GB19_reelectedW17 = 1 if districtW17 == 10873
replace GB19_reelectedW17 = 1 if districtW17 == 10874
replace GB19_reelectedW17 = 1 if districtW17 == 10875
replace GB19_reelectedW17 = 0 if districtW17 == 10876
replace GB19_reelectedW17 = 1 if districtW17 == 10877
replace GB19_reelectedW17 = 0 if districtW17 == 10878
replace GB19_reelectedW17 = 1 if districtW17 == 10879
replace GB19_reelectedW17 = 1 if districtW17 == 10880
replace GB19_reelectedW17 = 1 if districtW17 == 10881
replace GB19_reelectedW17 = 1 if districtW17 == 10882
replace GB19_reelectedW17 = 1 if districtW17 == 10883
replace GB19_reelectedW17 = 1 if districtW17 == 10884
replace GB19_reelectedW17 = 1 if districtW17 == 10885
replace GB19_reelectedW17 = 1 if districtW17 == 10886
replace GB19_reelectedW17 = 0 if districtW17 == 10887
replace GB19_reelectedW17 = 1 if districtW17 == 10888
replace GB19_reelectedW17 = 1 if districtW17 == 10889
replace GB19_reelectedW17 = 1 if districtW17 == 10890
replace GB19_reelectedW17 = 0 if districtW17 == 10891
replace GB19_reelectedW17 = 1 if districtW17 == 10892
replace GB19_reelectedW17 = 1 if districtW17 == 10893
replace GB19_reelectedW17 = 1 if districtW17 == 10894
replace GB19_reelectedW17 = 1 if districtW17 == 10895
replace GB19_reelectedW17 = 0 if districtW17 == 10896
replace GB19_reelectedW17 = 1 if districtW17 == 10897
replace GB19_reelectedW17 = 1 if districtW17 == 10898
replace GB19_reelectedW17 = 1 if districtW17 == 10899
replace GB19_reelectedW17 = 1 if districtW17 == 10900
replace GB19_reelectedW17 = 1 if districtW17 == 10901
replace GB19_reelectedW17 = 1 if districtW17 == 10902
replace GB19_reelectedW17 = 0 if districtW17 == 10903
replace GB19_reelectedW17 = 1 if districtW17 == 10904
replace GB19_reelectedW17 = 1 if districtW17 == 10905
replace GB19_reelectedW17 = 1 if districtW17 == 10906
replace GB19_reelectedW17 = 1 if districtW17 == 10907
replace GB19_reelectedW17 = 1 if districtW17 == 10908
replace GB19_reelectedW17 = 1 if districtW17 == 10909
replace GB19_reelectedW17 = 1 if districtW17 == 10910
replace GB19_reelectedW17 = 1 if districtW17 == 10911
replace GB19_reelectedW17 = 1 if districtW17 == 10912
replace GB19_reelectedW17 = 1 if districtW17 == 10913
replace GB19_reelectedW17 = 0 if districtW17 == 10914
replace GB19_reelectedW17 = 0 if districtW17 == 10915
replace GB19_reelectedW17 = 1 if districtW17 == 10916
replace GB19_reelectedW17 = 1 if districtW17 == 10917
replace GB19_reelectedW17 = 1 if districtW17 == 10918
replace GB19_reelectedW17 = 1 if districtW17 == 10919
replace GB19_reelectedW17 = 1 if districtW17 == 10920
replace GB19_reelectedW17 = 1 if districtW17 == 10921
replace GB19_reelectedW17 = 1 if districtW17 == 10922
replace GB19_reelectedW17 = 1 if districtW17 == 10923
replace GB19_reelectedW17 = 1 if districtW17 == 10924
replace GB19_reelectedW17 = 1 if districtW17 == 10925
replace GB19_reelectedW17 = 1 if districtW17 == 10926
replace GB19_reelectedW17 = 1 if districtW17 == 10927
replace GB19_reelectedW17 = 1 if districtW17 == 10928
replace GB19_reelectedW17 = 1 if districtW17 == 10929
replace GB19_reelectedW17 = 1 if districtW17 == 10930
replace GB19_reelectedW17 = 1 if districtW17 == 10931
replace GB19_reelectedW17 = 1 if districtW17 == 10932
replace GB19_reelectedW17 = 1 if districtW17 == 10933
replace GB19_reelectedW17 = 1 if districtW17 == 10934
replace GB19_reelectedW17 = 1 if districtW17 == 10935
replace GB19_reelectedW17 = 1 if districtW17 == 10936
replace GB19_reelectedW17 = 1 if districtW17 == 10937
replace GB19_reelectedW17 = 1 if districtW17 == 10938
replace GB19_reelectedW17 = 1 if districtW17 == 10939
replace GB19_reelectedW17 = 1 if districtW17 == 10940
replace GB19_reelectedW17 = 1 if districtW17 == 10941
replace GB19_reelectedW17 = 1 if districtW17 == 10942
replace GB19_reelectedW17 = 1 if districtW17 == 10943
replace GB19_reelectedW17 = 1 if districtW17 == 10944
replace GB19_reelectedW17 = 1 if districtW17 == 10945
replace GB19_reelectedW17 = 1 if districtW17 == 10946
replace GB19_reelectedW17 = 1 if districtW17 == 10947
replace GB19_reelectedW17 = 1 if districtW17 == 10948
replace GB19_reelectedW17 = 1 if districtW17 == 10949
replace GB19_reelectedW17 = 1 if districtW17 == 10950
replace GB19_reelectedW17 = 1 if districtW17 == 10951
replace GB19_reelectedW17 = 1 if districtW17 == 10952
replace GB19_reelectedW17 = 1 if districtW17 == 10953
replace GB19_reelectedW17 = 1 if districtW17 == 10954
replace GB19_reelectedW17 = 1 if districtW17 == 10955
replace GB19_reelectedW17 = 1 if districtW17 == 10956
replace GB19_reelectedW17 = 1 if districtW17 == 10957
replace GB19_reelectedW17 = 1 if districtW17 == 10958
replace GB19_reelectedW17 = 1 if districtW17 == 10959
replace GB19_reelectedW17 = 0 if districtW17 == 10960
replace GB19_reelectedW17 = 1 if districtW17 == 10961
replace GB19_reelectedW17 = 1 if districtW17 == 10962
replace GB19_reelectedW17 = 1 if districtW17 == 10963
replace GB19_reelectedW17 = 1 if districtW17 == 10964
replace GB19_reelectedW17 = 1 if districtW17 == 10965
replace GB19_reelectedW17 = 1 if districtW17 == 10966
replace GB19_reelectedW17 = 1 if districtW17 == 10967
replace GB19_reelectedW17 = 1 if districtW17 == 10968
replace GB19_reelectedW17 = 1 if districtW17 == 10969
replace GB19_reelectedW17 = 1 if districtW17 == 10970
replace GB19_reelectedW17 = 0 if districtW17 == 10971
replace GB19_reelectedW17 = 0 if districtW17 == 10972
replace GB19_reelectedW17 = 0 if districtW17 == 10973
replace GB19_reelectedW17 = 1 if districtW17 == 10974
replace GB19_reelectedW17 = 1 if districtW17 == 10975
replace GB19_reelectedW17 = 1 if districtW17 == 10976
replace GB19_reelectedW17 = 1 if districtW17 == 10977
replace GB19_reelectedW17 = 1 if districtW17 == 10978
replace GB19_reelectedW17 = 1 if districtW17 == 10979
replace GB19_reelectedW17 = 0 if districtW17 == 10980
replace GB19_reelectedW17 = 1 if districtW17 == 10981
replace GB19_reelectedW17 = 1 if districtW17 == 10982
replace GB19_reelectedW17 = 1 if districtW17 == 10983
replace GB19_reelectedW17 = 1 if districtW17 == 10984
replace GB19_reelectedW17 = 1 if districtW17 == 10985
replace GB19_reelectedW17 = 1 if districtW17 == 10986
replace GB19_reelectedW17 = 1 if districtW17 == 10987
replace GB19_reelectedW17 = 1 if districtW17 == 10988
replace GB19_reelectedW17 = 1 if districtW17 == 10989
replace GB19_reelectedW17 = 1 if districtW17 == 10990
replace GB19_reelectedW17 = 1 if districtW17 == 10991
replace GB19_reelectedW17 = 1 if districtW17 == 10992
replace GB19_reelectedW17 = 1 if districtW17 == 10993
replace GB19_reelectedW17 = 1 if districtW17 == 10994
replace GB19_reelectedW17 = 1 if districtW17 == 10995
replace GB19_reelectedW17 = 1 if districtW17 == 10996
replace GB19_reelectedW17 = 1 if districtW17 == 10997
replace GB19_reelectedW17 = 1 if districtW17 == 10998
replace GB19_reelectedW17 = 1 if districtW17 == 10999
replace GB19_reelectedW17 = 1 if districtW17 == 11000
replace GB19_reelectedW17 = 1 if districtW17 == 11001
replace GB19_reelectedW17 = 1 if districtW17 == 11002
replace GB19_reelectedW17 = 1 if districtW17 == 11003
replace GB19_reelectedW17 = 1 if districtW17 == 11004
replace GB19_reelectedW17 = 1 if districtW17 == 11005
replace GB19_reelectedW17 = 1 if districtW17 == 11006
replace GB19_reelectedW17 = 1 if districtW17 == 11007
replace GB19_reelectedW17 = 0 if districtW17 == 11008
replace GB19_reelectedW17 = 0 if districtW17 == 11009
replace GB19_reelectedW17 = 1 if districtW17 == 11010
replace GB19_reelectedW17 = 1 if districtW17 == 11011
replace GB19_reelectedW17 = 1 if districtW17 == 11012
replace GB19_reelectedW17 = 1 if districtW17 == 11013
replace GB19_reelectedW17 = 1 if districtW17 == 11014
replace GB19_reelectedW17 = 1 if districtW17 == 11015
replace GB19_reelectedW17 = 1 if districtW17 == 11016
replace GB19_reelectedW17 = 1 if districtW17 == 11017
replace GB19_reelectedW17 = 0 if districtW17 == 11018
replace GB19_reelectedW17 = 1 if districtW17 == 11019
replace GB19_reelectedW17 = 1 if districtW17 == 11020
replace GB19_reelectedW17 = 1 if districtW17 == 11021
replace GB19_reelectedW17 = 1 if districtW17 == 11022
replace GB19_reelectedW17 = 1 if districtW17 == 11023
replace GB19_reelectedW17 = 1 if districtW17 == 11024
replace GB19_reelectedW17 = 1 if districtW17 == 11025
replace GB19_reelectedW17 = 1 if districtW17 == 11026
replace GB19_reelectedW17 = 1 if districtW17 == 11027
replace GB19_reelectedW17 = 1 if districtW17 == 11028
replace GB19_reelectedW17 = 0 if districtW17 == 11029
replace GB19_reelectedW17 = 0 if districtW17 == 11030
replace GB19_reelectedW17 = 1 if districtW17 == 11031
replace GB19_reelectedW17 = 1 if districtW17 == 11032
replace GB19_reelectedW17 = 1 if districtW17 == 11033
replace GB19_reelectedW17 = 1 if districtW17 == 11034
replace GB19_reelectedW17 = 1 if districtW17 == 11035
replace GB19_reelectedW17 = 1 if districtW17 == 11036
replace GB19_reelectedW17 = 1 if districtW17 == 11037
replace GB19_reelectedW17 = 1 if districtW17 == 11038
replace GB19_reelectedW17 = 1 if districtW17 == 11039
replace GB19_reelectedW17 = 1 if districtW17 == 11040
replace GB19_reelectedW17 = 1 if districtW17 == 11041
replace GB19_reelectedW17 = 1 if districtW17 == 11042
replace GB19_reelectedW17 = 1 if districtW17 == 11043
replace GB19_reelectedW17 = 1 if districtW17 == 11044
replace GB19_reelectedW17 = 1 if districtW17 == 11045
replace GB19_reelectedW17 = 1 if districtW17 == 11046
replace GB19_reelectedW17 = 1 if districtW17 == 11047
replace GB19_reelectedW17 = 1 if districtW17 == 11048
replace GB19_reelectedW17 = 0 if districtW17 == 11049
replace GB19_reelectedW17 = 1 if districtW17 == 11050
replace GB19_reelectedW17 = 0 if districtW17 == 11051
replace GB19_reelectedW17 = 1 if districtW17 == 11052
replace GB19_reelectedW17 = 0 if districtW17 == 11053
replace GB19_reelectedW17 = 1 if districtW17 == 11054
replace GB19_reelectedW17 = 1 if districtW17 == 11055
replace GB19_reelectedW17 = 1 if districtW17 == 11056
replace GB19_reelectedW17 = 1 if districtW17 == 11057
replace GB19_reelectedW17 = 1 if districtW17 == 11058
replace GB19_reelectedW17 = 1 if districtW17 == 11059
replace GB19_reelectedW17 = 1 if districtW17 == 11060
replace GB19_reelectedW17 = 1 if districtW17 == 11061
replace GB19_reelectedW17 = 1 if districtW17 == 11062
replace GB19_reelectedW17 = 1 if districtW17 == 40001
replace GB19_reelectedW17 = 1 if districtW17 == 40002
replace GB19_reelectedW17 = 1 if districtW17 == 40003
replace GB19_reelectedW17 = 1 if districtW17 == 40004
replace GB19_reelectedW17 = 1 if districtW17 == 40005
replace GB19_reelectedW17 = 1 if districtW17 == 40006
replace GB19_reelectedW17 = 1 if districtW17 == 40007
replace GB19_reelectedW17 = 1 if districtW17 == 40008
replace GB19_reelectedW17 = 1 if districtW17 == 40009
replace GB19_reelectedW17 = 1 if districtW17 == 40010
replace GB19_reelectedW17 = 1 if districtW17 == 40011
replace GB19_reelectedW17 = 1 if districtW17 == 40012
replace GB19_reelectedW17 = 1 if districtW17 == 40013
replace GB19_reelectedW17 = 1 if districtW17 == 40014
replace GB19_reelectedW17 = 1 if districtW17 == 40015
replace GB19_reelectedW17 = 1 if districtW17 == 40016
replace GB19_reelectedW17 = 1 if districtW17 == 40017
replace GB19_reelectedW17 = 1 if districtW17 == 40018
replace GB19_reelectedW17 = 1 if districtW17 == 20001
replace GB19_reelectedW17 = 0 if districtW17 == 20002
replace GB19_reelectedW17 = 1 if districtW17 == 20003
replace GB19_reelectedW17 = 0 if districtW17 == 20004
replace GB19_reelectedW17 = 1 if districtW17 == 20005
replace GB19_reelectedW17 = 0 if districtW17 == 20006
replace GB19_reelectedW17 = 1 if districtW17 == 20007
replace GB19_reelectedW17 = 1 if districtW17 == 20008
replace GB19_reelectedW17 = 1 if districtW17 == 20009
replace GB19_reelectedW17 = 1 if districtW17 == 20010
replace GB19_reelectedW17 = 0 if districtW17 == 20011
replace GB19_reelectedW17 = 1 if districtW17 == 20012
replace GB19_reelectedW17 = 1 if districtW17 == 20013
replace GB19_reelectedW17 = 1 if districtW17 == 20014
replace GB19_reelectedW17 = 1 if districtW17 == 20015
replace GB19_reelectedW17 = 1 if districtW17 == 20016
replace GB19_reelectedW17 = 1 if districtW17 == 20017
replace GB19_reelectedW17 = 0 if districtW17 == 20018
replace GB19_reelectedW17 = 1 if districtW17 == 20019
replace GB19_reelectedW17 = 0 if districtW17 == 20020
replace GB19_reelectedW17 = 0 if districtW17 == 20021
replace GB19_reelectedW17 = 1 if districtW17 == 20022
replace GB19_reelectedW17 = 1 if districtW17 == 20023
replace GB19_reelectedW17 = 1 if districtW17 == 20024
replace GB19_reelectedW17 = 1 if districtW17 == 20025
replace GB19_reelectedW17 = 1 if districtW17 == 20026
replace GB19_reelectedW17 = 1 if districtW17 == 20027
replace GB19_reelectedW17 = 1 if districtW17 == 20028
replace GB19_reelectedW17 = 1 if districtW17 == 20029
replace GB19_reelectedW17 = 1 if districtW17 == 20030
replace GB19_reelectedW17 = 1 if districtW17 == 20031
replace GB19_reelectedW17 = 0 if districtW17 == 20032
replace GB19_reelectedW17 = 1 if districtW17 == 20033
replace GB19_reelectedW17 = 1 if districtW17 == 20034
replace GB19_reelectedW17 = 1 if districtW17 == 20035
replace GB19_reelectedW17 = 1 if districtW17 == 20036
replace GB19_reelectedW17 = 0 if districtW17 == 20037
replace GB19_reelectedW17 = 1 if districtW17 == 20038
replace GB19_reelectedW17 = 1 if districtW17 == 20039
replace GB19_reelectedW17 = 1 if districtW17 == 20040
replace GB19_reelectedW17 = 0 if districtW17 == 20041
replace GB19_reelectedW17 = 1 if districtW17 == 20042
replace GB19_reelectedW17 = 1 if districtW17 == 20043
replace GB19_reelectedW17 = 1 if districtW17 == 20044
replace GB19_reelectedW17 = 0 if districtW17 == 20045
replace GB19_reelectedW17 = 1 if districtW17 == 20046
replace GB19_reelectedW17 = 1 if districtW17 == 20047
replace GB19_reelectedW17 = 1 if districtW17 == 20048
replace GB19_reelectedW17 = 0 if districtW17 == 20049
replace GB19_reelectedW17 = 0 if districtW17 == 20050
replace GB19_reelectedW17 = 1 if districtW17 == 20051
replace GB19_reelectedW17 = 1 if districtW17 == 20052
replace GB19_reelectedW17 = 1 if districtW17 == 20053
replace GB19_reelectedW17 = 1 if districtW17 == 20054
replace GB19_reelectedW17 = 1 if districtW17 == 20055
replace GB19_reelectedW17 = 0 if districtW17 == 20056
replace GB19_reelectedW17 = 0 if districtW17 == 20057
replace GB19_reelectedW17 = 1 if districtW17 == 20058
replace GB19_reelectedW17 = 1 if districtW17 == 20059
replace GB19_reelectedW17 = 0 if districtW17 == 30041
replace GB19_reelectedW17 = 0 if districtW17 == 30042
replace GB19_reelectedW17 = 1 if districtW17 == 30043
replace GB19_reelectedW17 = 0 if districtW17 == 30044
replace GB19_reelectedW17 = 1 if districtW17 == 30045
replace GB19_reelectedW17 = 1 if districtW17 == 30046
replace GB19_reelectedW17 = 1 if districtW17 == 30047
replace GB19_reelectedW17 = 1 if districtW17 == 30048
replace GB19_reelectedW17 = 1 if districtW17 == 30049
replace GB19_reelectedW17 = 1 if districtW17 == 30050
replace GB19_reelectedW17 = 1 if districtW17 == 30051
replace GB19_reelectedW17 = 1 if districtW17 == 30052
replace GB19_reelectedW17 = 1 if districtW17 == 30053
replace GB19_reelectedW17 = 1 if districtW17 == 30054
replace GB19_reelectedW17 = 1 if districtW17 == 30055
replace GB19_reelectedW17 = 1 if districtW17 == 30056
replace GB19_reelectedW17 = 1 if districtW17 == 30057
replace GB19_reelectedW17 = 1 if districtW17 == 30058
replace GB19_reelectedW17 = 1 if districtW17 == 30059
replace GB19_reelectedW17 = 0 if districtW17 == 30060
replace GB19_reelectedW17 = 1 if districtW17 == 30061
replace GB19_reelectedW17 = 0 if districtW17 == 30062
replace GB19_reelectedW17 = 1 if districtW17 == 30063
replace GB19_reelectedW17 = 1 if districtW17 == 30064
replace GB19_reelectedW17 = 1 if districtW17 == 30065
replace GB19_reelectedW17 = 1 if districtW17 == 30066
replace GB19_reelectedW17 = 1 if districtW17 == 30067
replace GB19_reelectedW17 = 1 if districtW17 == 30068
replace GB19_reelectedW17 = 1 if districtW17 == 30069
replace GB19_reelectedW17 = 1 if districtW17 == 30070
replace GB19_reelectedW17 = 1 if districtW17 == 30071
replace GB19_reelectedW17 = 1 if districtW17 == 30072
replace GB19_reelectedW17 = 0 if districtW17 == 30073
replace GB19_reelectedW17 = 1 if districtW17 == 30074
replace GB19_reelectedW17 = 1 if districtW17 == 30075
replace GB19_reelectedW17 = 1 if districtW17 == 30076
replace GB19_reelectedW17 = 1 if districtW17 == 30077
replace GB19_reelectedW17 = 1 if districtW17 == 30078
replace GB19_reelectedW17 = 1 if districtW17 == 30079
replace GB19_reelectedW17 = 1 if districtW17 == 30080

gen GB19_reelectedW18 = .

replace GB19_reelectedW18 = 1 if districtW18 == 10530
replace GB19_reelectedW18 = 1 if districtW18 == 10531
replace GB19_reelectedW18 = 1 if districtW18 == 10532
replace GB19_reelectedW18 = 1 if districtW18 == 10533
replace GB19_reelectedW18 = 1 if districtW18 == 10534
replace GB19_reelectedW18 = 0 if districtW18 == 10535
replace GB19_reelectedW18 = 1 if districtW18 == 10536
replace GB19_reelectedW18 = 1 if districtW18 == 10537
replace GB19_reelectedW18 = 1 if districtW18 == 10538
replace GB19_reelectedW18 = 1 if districtW18 == 10539
replace GB19_reelectedW18 = 1 if districtW18 == 10540
replace GB19_reelectedW18 = 1 if districtW18 == 10541
replace GB19_reelectedW18 = 1 if districtW18 == 10542
replace GB19_reelectedW18 = 0 if districtW18 == 10543
replace GB19_reelectedW18 = 1 if districtW18 == 10544
replace GB19_reelectedW18 = 1 if districtW18 == 10545
replace GB19_reelectedW18 = 0 if districtW18 == 10546
replace GB19_reelectedW18 = 1 if districtW18 == 10547
replace GB19_reelectedW18 = 1 if districtW18 == 10548
replace GB19_reelectedW18 = 1 if districtW18 == 10549
replace GB19_reelectedW18 = 1 if districtW18 == 10550
replace GB19_reelectedW18 = 1 if districtW18 == 10551
replace GB19_reelectedW18 = 1 if districtW18 == 10552
replace GB19_reelectedW18 = 1 if districtW18 == 10553
replace GB19_reelectedW18 = 1 if districtW18 == 10554
replace GB19_reelectedW18 = 1 if districtW18 == 10555
replace GB19_reelectedW18 = 1 if districtW18 == 10556
replace GB19_reelectedW18 = 1 if districtW18 == 10557
replace GB19_reelectedW18 = 1 if districtW18 == 10558
replace GB19_reelectedW18 = 1 if districtW18 == 10559
replace GB19_reelectedW18 = 1 if districtW18 == 10560
replace GB19_reelectedW18 = 1 if districtW18 == 10561
replace GB19_reelectedW18 = 1 if districtW18 == 10562
replace GB19_reelectedW18 = 1 if districtW18 == 10563
replace GB19_reelectedW18 = 1 if districtW18 == 10564
replace GB19_reelectedW18 = 0 if districtW18 == 10565
replace GB19_reelectedW18 = 1 if districtW18 == 10566
replace GB19_reelectedW18 = 1 if districtW18 == 10567
replace GB19_reelectedW18 = 1 if districtW18 == 10568
replace GB19_reelectedW18 = 0 if districtW18 == 10569
replace GB19_reelectedW18 = 1 if districtW18 == 10570
replace GB19_reelectedW18 = 1 if districtW18 == 10571
replace GB19_reelectedW18 = 1 if districtW18 == 10572
replace GB19_reelectedW18 = 0 if districtW18 == 10573
replace GB19_reelectedW18 = 1 if districtW18 == 10574
replace GB19_reelectedW18 = 0 if districtW18 == 10575
replace GB19_reelectedW18 = 1 if districtW18 == 10576
replace GB19_reelectedW18 = 0 if districtW18 == 10577
replace GB19_reelectedW18 = 0 if districtW18 == 10578
replace GB19_reelectedW18 = 1 if districtW18 == 10579
replace GB19_reelectedW18 = 1 if districtW18 == 10580
replace GB19_reelectedW18 = 1 if districtW18 == 10581
replace GB19_reelectedW18 = 1 if districtW18 == 10582
replace GB19_reelectedW18 = 1 if districtW18 == 10583
replace GB19_reelectedW18 = 1 if districtW18 == 10584
replace GB19_reelectedW18 = 1 if districtW18 == 10585
replace GB19_reelectedW18 = 1 if districtW18 == 10586
replace GB19_reelectedW18 = 1 if districtW18 == 10587
replace GB19_reelectedW18 = 1 if districtW18 == 10588
replace GB19_reelectedW18 = 1 if districtW18 == 10589
replace GB19_reelectedW18 = 1 if districtW18 == 10590
replace GB19_reelectedW18 = 1 if districtW18 == 10591
replace GB19_reelectedW18 = 1 if districtW18 == 10592
replace GB19_reelectedW18 = 1 if districtW18 == 10593
replace GB19_reelectedW18 = 1 if districtW18 == 10594
replace GB19_reelectedW18 = 1 if districtW18 == 10595
replace GB19_reelectedW18 = 1 if districtW18 == 10596
replace GB19_reelectedW18 = 1 if districtW18 == 10597
replace GB19_reelectedW18 = 1 if districtW18 == 10598
replace GB19_reelectedW18 = 1 if districtW18 == 10599
replace GB19_reelectedW18 = 1 if districtW18 == 10600
replace GB19_reelectedW18 = 1 if districtW18 == 10601
replace GB19_reelectedW18 = 1 if districtW18 == 10602
replace GB19_reelectedW18 = 1 if districtW18 == 10603
replace GB19_reelectedW18 = 1 if districtW18 == 10604
replace GB19_reelectedW18 = 1 if districtW18 == 10605
replace GB19_reelectedW18 = 1 if districtW18 == 10606
replace GB19_reelectedW18 = 1 if districtW18 == 10607
replace GB19_reelectedW18 = 0 if districtW18 == 10608
replace GB19_reelectedW18 = 0 if districtW18 == 10609
replace GB19_reelectedW18 = 1 if districtW18 == 10610
replace GB19_reelectedW18 = 0 if districtW18 == 10611
replace GB19_reelectedW18 = 0 if districtW18 == 10612
replace GB19_reelectedW18 = 1 if districtW18 == 10613
replace GB19_reelectedW18 = 1 if districtW18 == 10614
replace GB19_reelectedW18 = 1 if districtW18 == 10615
replace GB19_reelectedW18 = 1 if districtW18 == 10616
replace GB19_reelectedW18 = 1 if districtW18 == 10617
replace GB19_reelectedW18 = 1 if districtW18 == 10618
replace GB19_reelectedW18 = 1 if districtW18 == 10619
replace GB19_reelectedW18 = 1 if districtW18 == 10620
replace GB19_reelectedW18 = 0 if districtW18 == 10621
replace GB19_reelectedW18 = 1 if districtW18 == 10622
replace GB19_reelectedW18 = 1 if districtW18 == 10623
replace GB19_reelectedW18 = 1 if districtW18 == 10624
replace GB19_reelectedW18 = 1 if districtW18 == 10625
replace GB19_reelectedW18 = 1 if districtW18 == 10626
replace GB19_reelectedW18 = 1 if districtW18 == 10627
replace GB19_reelectedW18 = 1 if districtW18 == 10628
replace GB19_reelectedW18 = 1 if districtW18 == 10629
replace GB19_reelectedW18 = 1 if districtW18 == 10630
replace GB19_reelectedW18 = 1 if districtW18 == 10631
replace GB19_reelectedW18 = 1 if districtW18 == 10632
replace GB19_reelectedW18 = 1 if districtW18 == 10633
replace GB19_reelectedW18 = 1 if districtW18 == 10634
replace GB19_reelectedW18 = 1 if districtW18 == 10635
replace GB19_reelectedW18 = 1 if districtW18 == 10636
replace GB19_reelectedW18 = 0 if districtW18 == 10637
replace GB19_reelectedW18 = 1 if districtW18 == 10638
replace GB19_reelectedW18 = 1 if districtW18 == 10639
replace GB19_reelectedW18 = 1 if districtW18 == 10640
replace GB19_reelectedW18 = 1 if districtW18 == 10641
replace GB19_reelectedW18 = 1 if districtW18 == 10642
replace GB19_reelectedW18 = 1 if districtW18 == 10643
replace GB19_reelectedW18 = 1 if districtW18 == 10644
replace GB19_reelectedW18 = 0 if districtW18 == 10645
replace GB19_reelectedW18 = 1 if districtW18 == 10646
replace GB19_reelectedW18 = 1 if districtW18 == 10647
replace GB19_reelectedW18 = 1 if districtW18 == 10648
replace GB19_reelectedW18 = 1 if districtW18 == 10649
replace GB19_reelectedW18 = 1 if districtW18 == 10650
replace GB19_reelectedW18 = 1 if districtW18 == 10651
replace GB19_reelectedW18 = 1 if districtW18 == 10652
replace GB19_reelectedW18 = 0 if districtW18 == 10653
replace GB19_reelectedW18 = 1 if districtW18 == 10654
replace GB19_reelectedW18 = 1 if districtW18 == 10655
replace GB19_reelectedW18 = 1 if districtW18 == 10656
replace GB19_reelectedW18 = 1 if districtW18 == 10657
replace GB19_reelectedW18 = 0 if districtW18 == 10658
replace GB19_reelectedW18 = 1 if districtW18 == 10659
replace GB19_reelectedW18 = 1 if districtW18 == 10660
replace GB19_reelectedW18 = 1 if districtW18 == 10661
replace GB19_reelectedW18 = 0 if districtW18 == 10662
replace GB19_reelectedW18 = 1 if districtW18 == 10663
replace GB19_reelectedW18 = 1 if districtW18 == 10664
replace GB19_reelectedW18 = 1 if districtW18 == 10665
replace GB19_reelectedW18 = 0 if districtW18 == 10666
replace GB19_reelectedW18 = 0 if districtW18 == 10667
replace GB19_reelectedW18 = 1 if districtW18 == 10668
replace GB19_reelectedW18 = 1 if districtW18 == 10669
replace GB19_reelectedW18 = 1 if districtW18 == 10670
replace GB19_reelectedW18 = 0 if districtW18 == 10671
replace GB19_reelectedW18 = 1 if districtW18 == 10672
replace GB19_reelectedW18 = 1 if districtW18 == 10673
replace GB19_reelectedW18 = 1 if districtW18 == 10674
replace GB19_reelectedW18 = 0 if districtW18 == 10675
replace GB19_reelectedW18 = 1 if districtW18 == 10676
replace GB19_reelectedW18 = 1 if districtW18 == 10677
replace GB19_reelectedW18 = 1 if districtW18 == 10678
replace GB19_reelectedW18 = 1 if districtW18 == 10679
replace GB19_reelectedW18 = 1 if districtW18 == 10680
replace GB19_reelectedW18 = 1 if districtW18 == 10681
replace GB19_reelectedW18 = 1 if districtW18 == 10682
replace GB19_reelectedW18 = 1 if districtW18 == 10683
replace GB19_reelectedW18 = 0 if districtW18 == 10684
replace GB19_reelectedW18 = 1 if districtW18 == 10685
replace GB19_reelectedW18 = 1 if districtW18 == 10686
replace GB19_reelectedW18 = 1 if districtW18 == 10687
replace GB19_reelectedW18 = 1 if districtW18 == 10688
replace GB19_reelectedW18 = 1 if districtW18 == 10689
replace GB19_reelectedW18 = 1 if districtW18 == 10690
replace GB19_reelectedW18 = 1 if districtW18 == 10691
replace GB19_reelectedW18 = 1 if districtW18 == 10692
replace GB19_reelectedW18 = 1 if districtW18 == 10693
replace GB19_reelectedW18 = 1 if districtW18 == 10694
replace GB19_reelectedW18 = 1 if districtW18 == 10695
replace GB19_reelectedW18 = 1 if districtW18 == 10696
replace GB19_reelectedW18 = 1 if districtW18 == 10697
replace GB19_reelectedW18 = 1 if districtW18 == 10698
replace GB19_reelectedW18 = 1 if districtW18 == 10699
replace GB19_reelectedW18 = 1 if districtW18 == 10700
replace GB19_reelectedW18 = 1 if districtW18 == 10701
replace GB19_reelectedW18 = 1 if districtW18 == 10702
replace GB19_reelectedW18 = 1 if districtW18 == 10703
replace GB19_reelectedW18 = 1 if districtW18 == 10704
replace GB19_reelectedW18 = 1 if districtW18 == 10705
replace GB19_reelectedW18 = 1 if districtW18 == 10706
replace GB19_reelectedW18 = 1 if districtW18 == 10707
replace GB19_reelectedW18 = 1 if districtW18 == 10708
replace GB19_reelectedW18 = 1 if districtW18 == 10709
replace GB19_reelectedW18 = 0 if districtW18 == 10710
replace GB19_reelectedW18 = 1 if districtW18 == 10711
replace GB19_reelectedW18 = 1 if districtW18 == 10712
replace GB19_reelectedW18 = 1 if districtW18 == 10713
replace GB19_reelectedW18 = 1 if districtW18 == 10714
replace GB19_reelectedW18 = 1 if districtW18 == 10715
replace GB19_reelectedW18 = 0 if districtW18 == 10716
replace GB19_reelectedW18 = 1 if districtW18 == 10717
replace GB19_reelectedW18 = 1 if districtW18 == 10718
replace GB19_reelectedW18 = 1 if districtW18 == 10719
replace GB19_reelectedW18 = 1 if districtW18 == 10720
replace GB19_reelectedW18 = 1 if districtW18 == 10721
replace GB19_reelectedW18 = 1 if districtW18 == 10722
replace GB19_reelectedW18 = 1 if districtW18 == 10723
replace GB19_reelectedW18 = 1 if districtW18 == 10724
replace GB19_reelectedW18 = 1 if districtW18 == 10725
replace GB19_reelectedW18 = 1 if districtW18 == 10726
replace GB19_reelectedW18 = 1 if districtW18 == 10727
replace GB19_reelectedW18 = 1 if districtW18 == 10728
replace GB19_reelectedW18 = 1 if districtW18 == 10729
replace GB19_reelectedW18 = 1 if districtW18 == 10730
replace GB19_reelectedW18 = 1 if districtW18 == 10731
replace GB19_reelectedW18 = 1 if districtW18 == 10732
replace GB19_reelectedW18 = 1 if districtW18 == 10733
replace GB19_reelectedW18 = 1 if districtW18 == 10734
replace GB19_reelectedW18 = 1 if districtW18 == 10735
replace GB19_reelectedW18 = 1 if districtW18 == 10736
replace GB19_reelectedW18 = 1 if districtW18 == 10737
replace GB19_reelectedW18 = 1 if districtW18 == 10738
replace GB19_reelectedW18 = 1 if districtW18 == 10739
replace GB19_reelectedW18 = 1 if districtW18 == 10740
replace GB19_reelectedW18 = 1 if districtW18 == 10741
replace GB19_reelectedW18 = 1 if districtW18 == 10742
replace GB19_reelectedW18 = 1 if districtW18 == 10743
replace GB19_reelectedW18 = 1 if districtW18 == 10744
replace GB19_reelectedW18 = 1 if districtW18 == 10745
replace GB19_reelectedW18 = 1 if districtW18 == 10746
replace GB19_reelectedW18 = 0 if districtW18 == 10747
replace GB19_reelectedW18 = 0 if districtW18 == 10748
replace GB19_reelectedW18 = 1 if districtW18 == 10749
replace GB19_reelectedW18 = 1 if districtW18 == 10750
replace GB19_reelectedW18 = 1 if districtW18 == 10751
replace GB19_reelectedW18 = 1 if districtW18 == 10752
replace GB19_reelectedW18 = 1 if districtW18 == 10753
replace GB19_reelectedW18 = 1 if districtW18 == 10754
replace GB19_reelectedW18 = 1 if districtW18 == 10755
replace GB19_reelectedW18 = 1 if districtW18 == 10756
replace GB19_reelectedW18 = 1 if districtW18 == 10757
replace GB19_reelectedW18 = 0 if districtW18 == 10758
replace GB19_reelectedW18 = 1 if districtW18 == 10759
replace GB19_reelectedW18 = 0 if districtW18 == 10760
replace GB19_reelectedW18 = 0 if districtW18 == 10761
replace GB19_reelectedW18 = 1 if districtW18 == 10762
replace GB19_reelectedW18 = 1 if districtW18 == 10763
replace GB19_reelectedW18 = 1 if districtW18 == 10764
replace GB19_reelectedW18 = 1 if districtW18 == 10765
replace GB19_reelectedW18 = 0 if districtW18 == 10766
replace GB19_reelectedW18 = 1 if districtW18 == 10767
replace GB19_reelectedW18 = 0 if districtW18 == 10768
replace GB19_reelectedW18 = 1 if districtW18 == 10769
replace GB19_reelectedW18 = 1 if districtW18 == 10770
replace GB19_reelectedW18 = 1 if districtW18 == 10771
replace GB19_reelectedW18 = 1 if districtW18 == 10772
replace GB19_reelectedW18 = 1 if districtW18 == 10773
replace GB19_reelectedW18 = 1 if districtW18 == 10774
replace GB19_reelectedW18 = 1 if districtW18 == 10775
replace GB19_reelectedW18 = 1 if districtW18 == 10776
replace GB19_reelectedW18 = 1 if districtW18 == 10777
replace GB19_reelectedW18 = 1 if districtW18 == 10778
replace GB19_reelectedW18 = 1 if districtW18 == 10779
replace GB19_reelectedW18 = 1 if districtW18 == 10780
replace GB19_reelectedW18 = 1 if districtW18 == 10781
replace GB19_reelectedW18 = 1 if districtW18 == 10782
replace GB19_reelectedW18 = 1 if districtW18 == 10783
replace GB19_reelectedW18 = 1 if districtW18 == 10784
replace GB19_reelectedW18 = 0 if districtW18 == 10785
replace GB19_reelectedW18 = 1 if districtW18 == 10786
replace GB19_reelectedW18 = 1 if districtW18 == 10787
replace GB19_reelectedW18 = 1 if districtW18 == 10788
replace GB19_reelectedW18 = 1 if districtW18 == 10789
replace GB19_reelectedW18 = 1 if districtW18 == 10790
replace GB19_reelectedW18 = 1 if districtW18 == 10791
replace GB19_reelectedW18 = 0 if districtW18 == 10792
replace GB19_reelectedW18 = 0 if districtW18 == 10793
replace GB19_reelectedW18 = 1 if districtW18 == 10794
replace GB19_reelectedW18 = 0 if districtW18 == 10795
replace GB19_reelectedW18 = 0 if districtW18 == 10796
replace GB19_reelectedW18 = 1 if districtW18 == 10797
replace GB19_reelectedW18 = 1 if districtW18 == 10798
replace GB19_reelectedW18 = 1 if districtW18 == 10799
replace GB19_reelectedW18 = 1 if districtW18 == 10800
replace GB19_reelectedW18 = 0 if districtW18 == 10801
replace GB19_reelectedW18 = 1 if districtW18 == 10802
replace GB19_reelectedW18 = 1 if districtW18 == 10803
replace GB19_reelectedW18 = 1 if districtW18 == 10804
replace GB19_reelectedW18 = 1 if districtW18 == 10805
replace GB19_reelectedW18 = 1 if districtW18 == 10806
replace GB19_reelectedW18 = 1 if districtW18 == 10807
replace GB19_reelectedW18 = 1 if districtW18 == 10808
replace GB19_reelectedW18 = 1 if districtW18 == 10809
replace GB19_reelectedW18 = 1 if districtW18 == 10810
replace GB19_reelectedW18 = 1 if districtW18 == 10811
replace GB19_reelectedW18 = 1 if districtW18 == 10812
replace GB19_reelectedW18 = 1 if districtW18 == 10813
replace GB19_reelectedW18 = 1 if districtW18 == 10814
replace GB19_reelectedW18 = 1 if districtW18 == 10815
replace GB19_reelectedW18 = 1 if districtW18 == 10816
replace GB19_reelectedW18 = 1 if districtW18 == 10817
replace GB19_reelectedW18 = 1 if districtW18 == 10818
replace GB19_reelectedW18 = 1 if districtW18 == 10819
replace GB19_reelectedW18 = 1 if districtW18 == 10820
replace GB19_reelectedW18 = 1 if districtW18 == 10821
replace GB19_reelectedW18 = 1 if districtW18 == 10822
replace GB19_reelectedW18 = 1 if districtW18 == 10823
replace GB19_reelectedW18 = 1 if districtW18 == 10824
replace GB19_reelectedW18 = 1 if districtW18 == 10825
replace GB19_reelectedW18 = 1 if districtW18 == 10826
replace GB19_reelectedW18 = 1 if districtW18 == 10827
replace GB19_reelectedW18 = 1 if districtW18 == 10828
replace GB19_reelectedW18 = 1 if districtW18 == 10829
replace GB19_reelectedW18 = 1 if districtW18 == 10830
replace GB19_reelectedW18 = 1 if districtW18 == 10831
replace GB19_reelectedW18 = 1 if districtW18 == 10832
replace GB19_reelectedW18 = 1 if districtW18 == 10833
replace GB19_reelectedW18 = 0 if districtW18 == 10834
replace GB19_reelectedW18 = 1 if districtW18 == 10835
replace GB19_reelectedW18 = 1 if districtW18 == 10836
replace GB19_reelectedW18 = 1 if districtW18 == 10837
replace GB19_reelectedW18 = 1 if districtW18 == 10838
replace GB19_reelectedW18 = 1 if districtW18 == 10839
replace GB19_reelectedW18 = 1 if districtW18 == 10840
replace GB19_reelectedW18 = 1 if districtW18 == 10841
replace GB19_reelectedW18 = 1 if districtW18 == 10842
replace GB19_reelectedW18 = 1 if districtW18 == 10843
replace GB19_reelectedW18 = 1 if districtW18 == 10844
replace GB19_reelectedW18 = 1 if districtW18 == 10845
replace GB19_reelectedW18 = 1 if districtW18 == 10846
replace GB19_reelectedW18 = 1 if districtW18 == 10847
replace GB19_reelectedW18 = 0 if districtW18 == 10848
replace GB19_reelectedW18 = 1 if districtW18 == 10849
replace GB19_reelectedW18 = 1 if districtW18 == 10850
replace GB19_reelectedW18 = 1 if districtW18 == 10851
replace GB19_reelectedW18 = 1 if districtW18 == 10852
replace GB19_reelectedW18 = 1 if districtW18 == 10853
replace GB19_reelectedW18 = 1 if districtW18 == 10854
replace GB19_reelectedW18 = 1 if districtW18 == 10855
replace GB19_reelectedW18 = 0 if districtW18 == 10856
replace GB19_reelectedW18 = 1 if districtW18 == 10857
replace GB19_reelectedW18 = 1 if districtW18 == 10858
replace GB19_reelectedW18 = 1 if districtW18 == 10859
replace GB19_reelectedW18 = 1 if districtW18 == 10860
replace GB19_reelectedW18 = 1 if districtW18 == 10861
replace GB19_reelectedW18 = 1 if districtW18 == 10862
replace GB19_reelectedW18 = 1 if districtW18 == 10863
replace GB19_reelectedW18 = 1 if districtW18 == 10864
replace GB19_reelectedW18 = 0 if districtW18 == 10865
replace GB19_reelectedW18 = 1 if districtW18 == 10866
replace GB19_reelectedW18 = 1 if districtW18 == 10867
replace GB19_reelectedW18 = 1 if districtW18 == 10868
replace GB19_reelectedW18 = 1 if districtW18 == 10869
replace GB19_reelectedW18 = 1 if districtW18 == 10870
replace GB19_reelectedW18 = 1 if districtW18 == 10871
replace GB19_reelectedW18 = 1 if districtW18 == 10872
replace GB19_reelectedW18 = 1 if districtW18 == 10873
replace GB19_reelectedW18 = 1 if districtW18 == 10874
replace GB19_reelectedW18 = 1 if districtW18 == 10875
replace GB19_reelectedW18 = 0 if districtW18 == 10876
replace GB19_reelectedW18 = 1 if districtW18 == 10877
replace GB19_reelectedW18 = 0 if districtW18 == 10878
replace GB19_reelectedW18 = 1 if districtW18 == 10879
replace GB19_reelectedW18 = 1 if districtW18 == 10880
replace GB19_reelectedW18 = 1 if districtW18 == 10881
replace GB19_reelectedW18 = 1 if districtW18 == 10882
replace GB19_reelectedW18 = 1 if districtW18 == 10883
replace GB19_reelectedW18 = 1 if districtW18 == 10884
replace GB19_reelectedW18 = 1 if districtW18 == 10885
replace GB19_reelectedW18 = 1 if districtW18 == 10886
replace GB19_reelectedW18 = 0 if districtW18 == 10887
replace GB19_reelectedW18 = 1 if districtW18 == 10888
replace GB19_reelectedW18 = 1 if districtW18 == 10889
replace GB19_reelectedW18 = 1 if districtW18 == 10890
replace GB19_reelectedW18 = 0 if districtW18 == 10891
replace GB19_reelectedW18 = 1 if districtW18 == 10892
replace GB19_reelectedW18 = 1 if districtW18 == 10893
replace GB19_reelectedW18 = 1 if districtW18 == 10894
replace GB19_reelectedW18 = 1 if districtW18 == 10895
replace GB19_reelectedW18 = 0 if districtW18 == 10896
replace GB19_reelectedW18 = 1 if districtW18 == 10897
replace GB19_reelectedW18 = 1 if districtW18 == 10898
replace GB19_reelectedW18 = 1 if districtW18 == 10899
replace GB19_reelectedW18 = 1 if districtW18 == 10900
replace GB19_reelectedW18 = 1 if districtW18 == 10901
replace GB19_reelectedW18 = 1 if districtW18 == 10902
replace GB19_reelectedW18 = 0 if districtW18 == 10903
replace GB19_reelectedW18 = 1 if districtW18 == 10904
replace GB19_reelectedW18 = 1 if districtW18 == 10905
replace GB19_reelectedW18 = 1 if districtW18 == 10906
replace GB19_reelectedW18 = 1 if districtW18 == 10907
replace GB19_reelectedW18 = 1 if districtW18 == 10908
replace GB19_reelectedW18 = 1 if districtW18 == 10909
replace GB19_reelectedW18 = 1 if districtW18 == 10910
replace GB19_reelectedW18 = 1 if districtW18 == 10911
replace GB19_reelectedW18 = 1 if districtW18 == 10912
replace GB19_reelectedW18 = 1 if districtW18 == 10913
replace GB19_reelectedW18 = 0 if districtW18 == 10914
replace GB19_reelectedW18 = 0 if districtW18 == 10915
replace GB19_reelectedW18 = 1 if districtW18 == 10916
replace GB19_reelectedW18 = 1 if districtW18 == 10917
replace GB19_reelectedW18 = 1 if districtW18 == 10918
replace GB19_reelectedW18 = 1 if districtW18 == 10919
replace GB19_reelectedW18 = 1 if districtW18 == 10920
replace GB19_reelectedW18 = 1 if districtW18 == 10921
replace GB19_reelectedW18 = 1 if districtW18 == 10922
replace GB19_reelectedW18 = 1 if districtW18 == 10923
replace GB19_reelectedW18 = 1 if districtW18 == 10924
replace GB19_reelectedW18 = 1 if districtW18 == 10925
replace GB19_reelectedW18 = 1 if districtW18 == 10926
replace GB19_reelectedW18 = 1 if districtW18 == 10927
replace GB19_reelectedW18 = 1 if districtW18 == 10928
replace GB19_reelectedW18 = 1 if districtW18 == 10929
replace GB19_reelectedW18 = 1 if districtW18 == 10930
replace GB19_reelectedW18 = 1 if districtW18 == 10931
replace GB19_reelectedW18 = 1 if districtW18 == 10932
replace GB19_reelectedW18 = 1 if districtW18 == 10933
replace GB19_reelectedW18 = 1 if districtW18 == 10934
replace GB19_reelectedW18 = 1 if districtW18 == 10935
replace GB19_reelectedW18 = 1 if districtW18 == 10936
replace GB19_reelectedW18 = 1 if districtW18 == 10937
replace GB19_reelectedW18 = 1 if districtW18 == 10938
replace GB19_reelectedW18 = 1 if districtW18 == 10939
replace GB19_reelectedW18 = 1 if districtW18 == 10940
replace GB19_reelectedW18 = 1 if districtW18 == 10941
replace GB19_reelectedW18 = 1 if districtW18 == 10942
replace GB19_reelectedW18 = 1 if districtW18 == 10943
replace GB19_reelectedW18 = 1 if districtW18 == 10944
replace GB19_reelectedW18 = 1 if districtW18 == 10945
replace GB19_reelectedW18 = 1 if districtW18 == 10946
replace GB19_reelectedW18 = 1 if districtW18 == 10947
replace GB19_reelectedW18 = 1 if districtW18 == 10948
replace GB19_reelectedW18 = 1 if districtW18 == 10949
replace GB19_reelectedW18 = 1 if districtW18 == 10950
replace GB19_reelectedW18 = 1 if districtW18 == 10951
replace GB19_reelectedW18 = 1 if districtW18 == 10952
replace GB19_reelectedW18 = 1 if districtW18 == 10953
replace GB19_reelectedW18 = 1 if districtW18 == 10954
replace GB19_reelectedW18 = 1 if districtW18 == 10955
replace GB19_reelectedW18 = 1 if districtW18 == 10956
replace GB19_reelectedW18 = 1 if districtW18 == 10957
replace GB19_reelectedW18 = 1 if districtW18 == 10958
replace GB19_reelectedW18 = 1 if districtW18 == 10959
replace GB19_reelectedW18 = 0 if districtW18 == 10960
replace GB19_reelectedW18 = 1 if districtW18 == 10961
replace GB19_reelectedW18 = 1 if districtW18 == 10962
replace GB19_reelectedW18 = 1 if districtW18 == 10963
replace GB19_reelectedW18 = 1 if districtW18 == 10964
replace GB19_reelectedW18 = 1 if districtW18 == 10965
replace GB19_reelectedW18 = 1 if districtW18 == 10966
replace GB19_reelectedW18 = 1 if districtW18 == 10967
replace GB19_reelectedW18 = 1 if districtW18 == 10968
replace GB19_reelectedW18 = 1 if districtW18 == 10969
replace GB19_reelectedW18 = 1 if districtW18 == 10970
replace GB19_reelectedW18 = 0 if districtW18 == 10971
replace GB19_reelectedW18 = 0 if districtW18 == 10972
replace GB19_reelectedW18 = 0 if districtW18 == 10973
replace GB19_reelectedW18 = 1 if districtW18 == 10974
replace GB19_reelectedW18 = 1 if districtW18 == 10975
replace GB19_reelectedW18 = 1 if districtW18 == 10976
replace GB19_reelectedW18 = 1 if districtW18 == 10977
replace GB19_reelectedW18 = 1 if districtW18 == 10978
replace GB19_reelectedW18 = 1 if districtW18 == 10979
replace GB19_reelectedW18 = 0 if districtW18 == 10980
replace GB19_reelectedW18 = 1 if districtW18 == 10981
replace GB19_reelectedW18 = 1 if districtW18 == 10982
replace GB19_reelectedW18 = 1 if districtW18 == 10983
replace GB19_reelectedW18 = 1 if districtW18 == 10984
replace GB19_reelectedW18 = 1 if districtW18 == 10985
replace GB19_reelectedW18 = 1 if districtW18 == 10986
replace GB19_reelectedW18 = 1 if districtW18 == 10987
replace GB19_reelectedW18 = 1 if districtW18 == 10988
replace GB19_reelectedW18 = 1 if districtW18 == 10989
replace GB19_reelectedW18 = 1 if districtW18 == 10990
replace GB19_reelectedW18 = 1 if districtW18 == 10991
replace GB19_reelectedW18 = 1 if districtW18 == 10992
replace GB19_reelectedW18 = 1 if districtW18 == 10993
replace GB19_reelectedW18 = 1 if districtW18 == 10994
replace GB19_reelectedW18 = 1 if districtW18 == 10995
replace GB19_reelectedW18 = 1 if districtW18 == 10996
replace GB19_reelectedW18 = 1 if districtW18 == 10997
replace GB19_reelectedW18 = 1 if districtW18 == 10998
replace GB19_reelectedW18 = 1 if districtW18 == 10999
replace GB19_reelectedW18 = 1 if districtW18 == 11000
replace GB19_reelectedW18 = 1 if districtW18 == 11001
replace GB19_reelectedW18 = 1 if districtW18 == 11002
replace GB19_reelectedW18 = 1 if districtW18 == 11003
replace GB19_reelectedW18 = 1 if districtW18 == 11004
replace GB19_reelectedW18 = 1 if districtW18 == 11005
replace GB19_reelectedW18 = 1 if districtW18 == 11006
replace GB19_reelectedW18 = 1 if districtW18 == 11007
replace GB19_reelectedW18 = 0 if districtW18 == 11008
replace GB19_reelectedW18 = 0 if districtW18 == 11009
replace GB19_reelectedW18 = 1 if districtW18 == 11010
replace GB19_reelectedW18 = 1 if districtW18 == 11011
replace GB19_reelectedW18 = 1 if districtW18 == 11012
replace GB19_reelectedW18 = 1 if districtW18 == 11013
replace GB19_reelectedW18 = 1 if districtW18 == 11014
replace GB19_reelectedW18 = 1 if districtW18 == 11015
replace GB19_reelectedW18 = 1 if districtW18 == 11016
replace GB19_reelectedW18 = 1 if districtW18 == 11017
replace GB19_reelectedW18 = 0 if districtW18 == 11018
replace GB19_reelectedW18 = 1 if districtW18 == 11019
replace GB19_reelectedW18 = 1 if districtW18 == 11020
replace GB19_reelectedW18 = 1 if districtW18 == 11021
replace GB19_reelectedW18 = 1 if districtW18 == 11022
replace GB19_reelectedW18 = 1 if districtW18 == 11023
replace GB19_reelectedW18 = 1 if districtW18 == 11024
replace GB19_reelectedW18 = 1 if districtW18 == 11025
replace GB19_reelectedW18 = 1 if districtW18 == 11026
replace GB19_reelectedW18 = 1 if districtW18 == 11027
replace GB19_reelectedW18 = 1 if districtW18 == 11028
replace GB19_reelectedW18 = 0 if districtW18 == 11029
replace GB19_reelectedW18 = 0 if districtW18 == 11030
replace GB19_reelectedW18 = 1 if districtW18 == 11031
replace GB19_reelectedW18 = 1 if districtW18 == 11032
replace GB19_reelectedW18 = 1 if districtW18 == 11033
replace GB19_reelectedW18 = 1 if districtW18 == 11034
replace GB19_reelectedW18 = 1 if districtW18 == 11035
replace GB19_reelectedW18 = 1 if districtW18 == 11036
replace GB19_reelectedW18 = 1 if districtW18 == 11037
replace GB19_reelectedW18 = 1 if districtW18 == 11038
replace GB19_reelectedW18 = 1 if districtW18 == 11039
replace GB19_reelectedW18 = 1 if districtW18 == 11040
replace GB19_reelectedW18 = 1 if districtW18 == 11041
replace GB19_reelectedW18 = 1 if districtW18 == 11042
replace GB19_reelectedW18 = 1 if districtW18 == 11043
replace GB19_reelectedW18 = 1 if districtW18 == 11044
replace GB19_reelectedW18 = 1 if districtW18 == 11045
replace GB19_reelectedW18 = 1 if districtW18 == 11046
replace GB19_reelectedW18 = 1 if districtW18 == 11047
replace GB19_reelectedW18 = 1 if districtW18 == 11048
replace GB19_reelectedW18 = 0 if districtW18 == 11049
replace GB19_reelectedW18 = 1 if districtW18 == 11050
replace GB19_reelectedW18 = 0 if districtW18 == 11051
replace GB19_reelectedW18 = 1 if districtW18 == 11052
replace GB19_reelectedW18 = 0 if districtW18 == 11053
replace GB19_reelectedW18 = 1 if districtW18 == 11054
replace GB19_reelectedW18 = 1 if districtW18 == 11055
replace GB19_reelectedW18 = 1 if districtW18 == 11056
replace GB19_reelectedW18 = 1 if districtW18 == 11057
replace GB19_reelectedW18 = 1 if districtW18 == 11058
replace GB19_reelectedW18 = 1 if districtW18 == 11059
replace GB19_reelectedW18 = 1 if districtW18 == 11060
replace GB19_reelectedW18 = 1 if districtW18 == 11061
replace GB19_reelectedW18 = 1 if districtW18 == 11062
replace GB19_reelectedW18 = 1 if districtW18 == 40001
replace GB19_reelectedW18 = 1 if districtW18 == 40002
replace GB19_reelectedW18 = 1 if districtW18 == 40003
replace GB19_reelectedW18 = 1 if districtW18 == 40004
replace GB19_reelectedW18 = 1 if districtW18 == 40005
replace GB19_reelectedW18 = 1 if districtW18 == 40006
replace GB19_reelectedW18 = 1 if districtW18 == 40007
replace GB19_reelectedW18 = 1 if districtW18 == 40008
replace GB19_reelectedW18 = 1 if districtW18 == 40009
replace GB19_reelectedW18 = 1 if districtW18 == 40010
replace GB19_reelectedW18 = 1 if districtW18 == 40011
replace GB19_reelectedW18 = 1 if districtW18 == 40012
replace GB19_reelectedW18 = 1 if districtW18 == 40013
replace GB19_reelectedW18 = 1 if districtW18 == 40014
replace GB19_reelectedW18 = 1 if districtW18 == 40015
replace GB19_reelectedW18 = 1 if districtW18 == 40016
replace GB19_reelectedW18 = 1 if districtW18 == 40017
replace GB19_reelectedW18 = 1 if districtW18 == 40018
replace GB19_reelectedW18 = 1 if districtW18 == 20001
replace GB19_reelectedW18 = 0 if districtW18 == 20002
replace GB19_reelectedW18 = 1 if districtW18 == 20003
replace GB19_reelectedW18 = 0 if districtW18 == 20004
replace GB19_reelectedW18 = 1 if districtW18 == 20005
replace GB19_reelectedW18 = 0 if districtW18 == 20006
replace GB19_reelectedW18 = 1 if districtW18 == 20007
replace GB19_reelectedW18 = 1 if districtW18 == 20008
replace GB19_reelectedW18 = 1 if districtW18 == 20009
replace GB19_reelectedW18 = 1 if districtW18 == 20010
replace GB19_reelectedW18 = 0 if districtW18 == 20011
replace GB19_reelectedW18 = 1 if districtW18 == 20012
replace GB19_reelectedW18 = 1 if districtW18 == 20013
replace GB19_reelectedW18 = 1 if districtW18 == 20014
replace GB19_reelectedW18 = 1 if districtW18 == 20015
replace GB19_reelectedW18 = 1 if districtW18 == 20016
replace GB19_reelectedW18 = 1 if districtW18 == 20017
replace GB19_reelectedW18 = 0 if districtW18 == 20018
replace GB19_reelectedW18 = 1 if districtW18 == 20019
replace GB19_reelectedW18 = 0 if districtW18 == 20020
replace GB19_reelectedW18 = 0 if districtW18 == 20021
replace GB19_reelectedW18 = 1 if districtW18 == 20022
replace GB19_reelectedW18 = 1 if districtW18 == 20023
replace GB19_reelectedW18 = 1 if districtW18 == 20024
replace GB19_reelectedW18 = 1 if districtW18 == 20025
replace GB19_reelectedW18 = 1 if districtW18 == 20026
replace GB19_reelectedW18 = 1 if districtW18 == 20027
replace GB19_reelectedW18 = 1 if districtW18 == 20028
replace GB19_reelectedW18 = 1 if districtW18 == 20029
replace GB19_reelectedW18 = 1 if districtW18 == 20030
replace GB19_reelectedW18 = 1 if districtW18 == 20031
replace GB19_reelectedW18 = 0 if districtW18 == 20032
replace GB19_reelectedW18 = 1 if districtW18 == 20033
replace GB19_reelectedW18 = 1 if districtW18 == 20034
replace GB19_reelectedW18 = 1 if districtW18 == 20035
replace GB19_reelectedW18 = 1 if districtW18 == 20036
replace GB19_reelectedW18 = 0 if districtW18 == 20037
replace GB19_reelectedW18 = 1 if districtW18 == 20038
replace GB19_reelectedW18 = 1 if districtW18 == 20039
replace GB19_reelectedW18 = 1 if districtW18 == 20040
replace GB19_reelectedW18 = 0 if districtW18 == 20041
replace GB19_reelectedW18 = 1 if districtW18 == 20042
replace GB19_reelectedW18 = 1 if districtW18 == 20043
replace GB19_reelectedW18 = 1 if districtW18 == 20044
replace GB19_reelectedW18 = 0 if districtW18 == 20045
replace GB19_reelectedW18 = 1 if districtW18 == 20046
replace GB19_reelectedW18 = 1 if districtW18 == 20047
replace GB19_reelectedW18 = 1 if districtW18 == 20048
replace GB19_reelectedW18 = 0 if districtW18 == 20049
replace GB19_reelectedW18 = 0 if districtW18 == 20050
replace GB19_reelectedW18 = 1 if districtW18 == 20051
replace GB19_reelectedW18 = 1 if districtW18 == 20052
replace GB19_reelectedW18 = 1 if districtW18 == 20053
replace GB19_reelectedW18 = 1 if districtW18 == 20054
replace GB19_reelectedW18 = 1 if districtW18 == 20055
replace GB19_reelectedW18 = 0 if districtW18 == 20056
replace GB19_reelectedW18 = 0 if districtW18 == 20057
replace GB19_reelectedW18 = 1 if districtW18 == 20058
replace GB19_reelectedW18 = 1 if districtW18 == 20059
replace GB19_reelectedW18 = 0 if districtW18 == 30041
replace GB19_reelectedW18 = 0 if districtW18 == 30042
replace GB19_reelectedW18 = 1 if districtW18 == 30043
replace GB19_reelectedW18 = 0 if districtW18 == 30044
replace GB19_reelectedW18 = 1 if districtW18 == 30045
replace GB19_reelectedW18 = 1 if districtW18 == 30046
replace GB19_reelectedW18 = 1 if districtW18 == 30047
replace GB19_reelectedW18 = 1 if districtW18 == 30048
replace GB19_reelectedW18 = 1 if districtW18 == 30049
replace GB19_reelectedW18 = 1 if districtW18 == 30050
replace GB19_reelectedW18 = 1 if districtW18 == 30051
replace GB19_reelectedW18 = 1 if districtW18 == 30052
replace GB19_reelectedW18 = 1 if districtW18 == 30053
replace GB19_reelectedW18 = 1 if districtW18 == 30054
replace GB19_reelectedW18 = 1 if districtW18 == 30055
replace GB19_reelectedW18 = 1 if districtW18 == 30056
replace GB19_reelectedW18 = 1 if districtW18 == 30057
replace GB19_reelectedW18 = 1 if districtW18 == 30058
replace GB19_reelectedW18 = 1 if districtW18 == 30059
replace GB19_reelectedW18 = 0 if districtW18 == 30060
replace GB19_reelectedW18 = 1 if districtW18 == 30061
replace GB19_reelectedW18 = 0 if districtW18 == 30062
replace GB19_reelectedW18 = 1 if districtW18 == 30063
replace GB19_reelectedW18 = 1 if districtW18 == 30064
replace GB19_reelectedW18 = 1 if districtW18 == 30065
replace GB19_reelectedW18 = 1 if districtW18 == 30066
replace GB19_reelectedW18 = 1 if districtW18 == 30067
replace GB19_reelectedW18 = 1 if districtW18 == 30068
replace GB19_reelectedW18 = 1 if districtW18 == 30069
replace GB19_reelectedW18 = 1 if districtW18 == 30070
replace GB19_reelectedW18 = 1 if districtW18 == 30071
replace GB19_reelectedW18 = 1 if districtW18 == 30072
replace GB19_reelectedW18 = 0 if districtW18 == 30073
replace GB19_reelectedW18 = 1 if districtW18 == 30074
replace GB19_reelectedW18 = 1 if districtW18 == 30075
replace GB19_reelectedW18 = 1 if districtW18 == 30076
replace GB19_reelectedW18 = 1 if districtW18 == 30077
replace GB19_reelectedW18 = 1 if districtW18 == 30078
replace GB19_reelectedW18 = 1 if districtW18 == 30079
replace GB19_reelectedW18 = 1 if districtW18 == 30080

********************************************
** COMPETITIVENESS: 2015 GENERAL ELECTION **
********************************************

* Margin of victory

gen GB15_marginW4 = .

replace GB15_marginW4 = 32.25953 if districtW4 == 10530
replace GB15_marginW4 = 29.68074 if districtW4 == 10531
replace GB15_marginW4 = 26.30798 if districtW4 == 10532
replace GB15_marginW4 = 9.197891 if districtW4 == 10533
replace GB15_marginW4 = 46.34984 if districtW4 == 10534
replace GB15_marginW4 = 18.60406 if districtW4 == 10535
replace GB15_marginW4 = 33.63313 if districtW4 == 10536
replace GB15_marginW4 = 27.6376 if districtW4 == 10537
replace GB15_marginW4 = 30.9605 if districtW4 == 10538
replace GB15_marginW4 = 31.71114 if districtW4 == 10539
replace GB15_marginW4 = 35.48244 if districtW4 == 10540
replace GB15_marginW4 = 34.01258 if districtW4 == 10541
replace GB15_marginW4 = 31.24334 if districtW4 == 10542
replace GB15_marginW4 = 1.837087 if districtW4 == 10543
replace GB15_marginW4 = 29.00902 if districtW4 == 10544
replace GB15_marginW4 = 20.84369 if districtW4 == 10545
replace GB15_marginW4 = 17.94112 if districtW4 == 10546
replace GB15_marginW4 = 8.126444 if districtW4 == 10547
replace GB15_marginW4 = 11.99905 if districtW4 == 10548
replace GB15_marginW4 = 15.55525 if districtW4 == 10549
replace GB15_marginW4 = 49.49119 if districtW4 == 10550
replace GB15_marginW4 = 37.84808 if districtW4 == 10551
replace GB15_marginW4 = 2.380332 if districtW4 == 10552
replace GB15_marginW4 = 8.729386 if districtW4 == 10553
replace GB15_marginW4 = 12.15645 if districtW4 == 10554
replace GB15_marginW4 = 45.94701 if districtW4 == 10555
replace GB15_marginW4 = 23.16571 if districtW4 == 10556
replace GB15_marginW4 = 36.3559 if districtW4 == 10557
replace GB15_marginW4 = 21.04155 if districtW4 == 10558
replace GB15_marginW4 = 52.75904 if districtW4 == 10559
replace GB15_marginW4 = 6.553167 if districtW4 == 10560
replace GB15_marginW4 = 14.7878 if districtW4 == 10561
replace GB15_marginW4 = 42.12473 if districtW4 == 10562
replace GB15_marginW4 = 56.92634 if districtW4 == 10563
replace GB15_marginW4 = 60.88651 if districtW4 == 10564
replace GB15_marginW4 = 5.908951 if districtW4 == 10565
replace GB15_marginW4 = 35.93795 if districtW4 == 10566
replace GB15_marginW4 = 18.64927 if districtW4 == 10567
replace GB15_marginW4 = 16.02634 if districtW4 == 10568
replace GB15_marginW4 = 8.906039 if districtW4 == 10569
replace GB15_marginW4 = 29.00066 if districtW4 == 10570
replace GB15_marginW4 = 45.46777 if districtW4 == 10571
replace GB15_marginW4 = 8.478665 if districtW4 == 10572
replace GB15_marginW4 = 7.969541 if districtW4 == 10573
replace GB15_marginW4 = 31.66058 if districtW4 == 10574
replace GB15_marginW4 = 23.99574 if districtW4 == 10575
replace GB15_marginW4 = 29.59504 if districtW4 == 10576
replace GB15_marginW4 = 26.7694 if districtW4 == 10577
replace GB15_marginW4 = 10.1411 if districtW4 == 10578
replace GB15_marginW4 = 26.82179 if districtW4 == 10579
replace GB15_marginW4 = 1.64842 if districtW4 == 10580
replace GB15_marginW4 = 63.57193 if districtW4 == 10581
replace GB15_marginW4 = 10.00485 if districtW4 == 10582
replace GB15_marginW4 = 20.50689 if districtW4 == 10583
replace GB15_marginW4 = 32.59642 if districtW4 == 10584
replace GB15_marginW4 = 29.70819 if districtW4 == 10585
replace GB15_marginW4 = 38.89915 if districtW4 == 10586
replace GB15_marginW4 = 17.10863 if districtW4 == 10587
replace GB15_marginW4 = 17.15425 if districtW4 == 10588
replace GB15_marginW4 = 28.3445 if districtW4 == 10589
replace GB15_marginW4 = 35.02178 if districtW4 == 10590
replace GB15_marginW4 = 41.77794 if districtW4 == 10591
replace GB15_marginW4 = 20.74088 if districtW4 == 10592
replace GB15_marginW4 = .8107394 if districtW4 == 10593
replace GB15_marginW4 = 42.02555 if districtW4 == 10594
replace GB15_marginW4 = 26.78385 if districtW4 == 10595
replace GB15_marginW4 = 25.82852 if districtW4 == 10596
replace GB15_marginW4 = 1.522979 if districtW4 == 10597
replace GB15_marginW4 = 14.57129 if districtW4 == 10598
replace GB15_marginW4 = 8.612296 if districtW4 == 10599
replace GB15_marginW4 = 9.543478 if districtW4 == 10600
replace GB15_marginW4 = 14.01991 if districtW4 == 10601
replace GB15_marginW4 = 8.833972 if districtW4 == 10602
replace GB15_marginW4 = 31.71655 if districtW4 == 10603
replace GB15_marginW4 = 30.7811 if districtW4 == 10604
replace GB15_marginW4 = 31.63747 if districtW4 == 10605
replace GB15_marginW4 = 36.33539 if districtW4 == 10606
replace GB15_marginW4 = 8.022081 if districtW4 == 10607
replace GB15_marginW4 = 42.72889 if districtW4 == 10608
replace GB15_marginW4 = 8.161828 if districtW4 == 10609
replace GB15_marginW4 = 22.24037 if districtW4 == 10610
replace GB15_marginW4 = .8357286 if districtW4 == 10611
replace GB15_marginW4 = 10.42465 if districtW4 == 10612
replace GB15_marginW4 = 35.89592 if districtW4 == 10613
replace GB15_marginW4 = 8.268431 if districtW4 == 10614
replace GB15_marginW4 = 50.08437 if districtW4 == 10615
replace GB15_marginW4 = 15.26991 if districtW4 == 10616
replace GB15_marginW4 = 1.15695 if districtW4 == 10617
replace GB15_marginW4 = 10.45245 if districtW4 == 10618
replace GB15_marginW4 = 18.32601 if districtW4 == 10619
replace GB15_marginW4 = 6.513724 if districtW4 == 10620
replace GB15_marginW4 = 3.171402 if districtW4 == 10621
replace GB15_marginW4 = 19.65676 if districtW4 == 10622
replace GB15_marginW4 = 39.05561 if districtW4 == 10623
replace GB15_marginW4 = 37.24232 if districtW4 == 10624
replace GB15_marginW4 = 32.397 if districtW4 == 10625
replace GB15_marginW4 = 26.59439 if districtW4 == 10626
replace GB15_marginW4 = 12.15369 if districtW4 == 10627
replace GB15_marginW4 = 33.91122 if districtW4 == 10628
replace GB15_marginW4 = 39.82996 if districtW4 == 10629
replace GB15_marginW4 = 12.12617 if districtW4 == 10630
replace GB15_marginW4 = 45.36317 if districtW4 == 10631
replace GB15_marginW4 = 29.84177 if districtW4 == 10632
replace GB15_marginW4 = 42.72563 if districtW4 == 10633
replace GB15_marginW4 = 19.14437 if districtW4 == 10634
replace GB15_marginW4 = 18.18543 if districtW4 == 10635
replace GB15_marginW4 = 14.44174 if districtW4 == 10636
replace GB15_marginW4 = 8.760056 if districtW4 == 10637
replace GB15_marginW4 = 36.66285 if districtW4 == 10638
replace GB15_marginW4 = 26.72655 if districtW4 == 10639
replace GB15_marginW4 = .1817793 if districtW4 == 10640
replace GB15_marginW4 = 25.04763 if districtW4 == 10641
replace GB15_marginW4 = 7.774785 if districtW4 == 10642
replace GB15_marginW4 = 17.50538 if districtW4 == 10643
replace GB15_marginW4 = 11.47285 if districtW4 == 10644
replace GB15_marginW4 = 9.468311 if districtW4 == 10645
replace GB15_marginW4 = 32.90372 if districtW4 == 10646
replace GB15_marginW4 = 6.469682 if districtW4 == 10647
replace GB15_marginW4 = 4.293802 if districtW4 == 10648
replace GB15_marginW4 = 29.06396 if districtW4 == 10649
replace GB15_marginW4 = 9.965524 if districtW4 == 10650
replace GB15_marginW4 = 7.295361 if districtW4 == 10651
replace GB15_marginW4 = 13.44181 if districtW4 == 10652
replace GB15_marginW4 = 7.255089 if districtW4 == 10653
replace GB15_marginW4 = .3116697 if districtW4 == 10654
replace GB15_marginW4 = 39.91629 if districtW4 == 10655
replace GB15_marginW4 = 29.6992 if districtW4 == 10656
replace GB15_marginW4 = 11.56794 if districtW4 == 10657
replace GB15_marginW4 = 7.676041 if districtW4 == 10658
replace GB15_marginW4 = 23.55107 if districtW4 == 10659
replace GB15_marginW4 = 40.09863 if districtW4 == 10660
replace GB15_marginW4 = 27.17355 if districtW4 == 10661
replace GB15_marginW4 = .0916302 if districtW4 == 10662
replace GB15_marginW4 = 21.62665 if districtW4 == 10663
replace GB15_marginW4 = 29.65309 if districtW4 == 10664
replace GB15_marginW4 = 42.34379 if districtW4 == 10665
replace GB15_marginW4 = 2.705577 if districtW4 == 10666
replace GB15_marginW4 = 20.91277 if districtW4 == 10667
replace GB15_marginW4 = 24.97031 if districtW4 == 10668
replace GB15_marginW4 = 29.82203 if districtW4 == 10669
replace GB15_marginW4 = 12.53186 if districtW4 == 10670
replace GB15_marginW4 = 11.00495 if districtW4 == 10671
replace GB15_marginW4 = 11.17509 if districtW4 == 10672
replace GB15_marginW4 = 31.38897 if districtW4 == 10673
replace GB15_marginW4 = .538373 if districtW4 == 10674
replace GB15_marginW4 = 25.40919 if districtW4 == 10675
replace GB15_marginW4 = 43.30463 if districtW4 == 10676
replace GB15_marginW4 = 42.28569 if districtW4 == 10677
replace GB15_marginW4 = 22.40803 if districtW4 == 10678
replace GB15_marginW4 = 65.50392 if districtW4 == 10679
replace GB15_marginW4 = 48.68826 if districtW4 == 10680
replace GB15_marginW4 = 40.38643 if districtW4 == 10681
replace GB15_marginW4 = 29.95912 if districtW4 == 10682
replace GB15_marginW4 = 29.87138 if districtW4 == 10683
replace GB15_marginW4 = 1.38545 if districtW4 == 10684
replace GB15_marginW4 = 16.4796 if districtW4 == 10685
replace GB15_marginW4 = 27.39905 if districtW4 == 10686
replace GB15_marginW4 = 37.29982 if districtW4 == 10687
replace GB15_marginW4 = 13.42907 if districtW4 == 10688
replace GB15_marginW4 = 14.68934 if districtW4 == 10689
replace GB15_marginW4 = 6.240007 if districtW4 == 10690
replace GB15_marginW4 = 2.353859 if districtW4 == 10691
replace GB15_marginW4 = 10.37501 if districtW4 == 10692
replace GB15_marginW4 = 36.43106 if districtW4 == 10693
replace GB15_marginW4 = 42.77515 if districtW4 == 10694
replace GB15_marginW4 = 7.416913 if districtW4 == 10695
replace GB15_marginW4 = 22.35024 if districtW4 == 10696
replace GB15_marginW4 = 50.22466 if districtW4 == 10697
replace GB15_marginW4 = 13.29742 if districtW4 == 10698
replace GB15_marginW4 = 40.69836 if districtW4 == 10699
replace GB15_marginW4 = 36.3557 if districtW4 == 10700
replace GB15_marginW4 = 23.2021 if districtW4 == 10701
replace GB15_marginW4 = 20.03625 if districtW4 == 10702
replace GB15_marginW4 = 11.15467 if districtW4 == 10703
replace GB15_marginW4 = 25.08089 if districtW4 == 10704
replace GB15_marginW4 = 22.187 if districtW4 == 10705
replace GB15_marginW4 = 30.36022 if districtW4 == 10706
replace GB15_marginW4 = 31.36152 if districtW4 == 10707
replace GB15_marginW4 = 55.41923 if districtW4 == 10708
replace GB15_marginW4 = 38.95755 if districtW4 == 10709
replace GB15_marginW4 = 6.221092 if districtW4 == 10710
replace GB15_marginW4 = 22.36714 if districtW4 == 10711
replace GB15_marginW4 = 13.79173 if districtW4 == 10712
replace GB15_marginW4 = 35.87119 if districtW4 == 10713
replace GB15_marginW4 = 35.32508 if districtW4 == 10714
replace GB15_marginW4 = 16.69359 if districtW4 == 10715
replace GB15_marginW4 = 13.45943 if districtW4 == 10716
replace GB15_marginW4 = 13.83885 if districtW4 == 10717
replace GB15_marginW4 = 25.57154 if districtW4 == 10718
replace GB15_marginW4 = 41.58115 if districtW4 == 10719
replace GB15_marginW4 = 48.12476 if districtW4 == 10720
replace GB15_marginW4 = 50.88903 if districtW4 == 10721
replace GB15_marginW4 = 7.03364 if districtW4 == 10722
replace GB15_marginW4 = .9782195 if districtW4 == 10723
replace GB15_marginW4 = 33.21574 if districtW4 == 10724
replace GB15_marginW4 = 45.05475 if districtW4 == 10725
replace GB15_marginW4 = 13.59049 if districtW4 == 10726
replace GB15_marginW4 = 2.108812 if districtW4 == 10727
replace GB15_marginW4 = 37.41496 if districtW4 == 10728
replace GB15_marginW4 = 18.86963 if districtW4 == 10729
replace GB15_marginW4 = 30.67109 if districtW4 == 10730
replace GB15_marginW4 = 9.708163 if districtW4 == 10731
replace GB15_marginW4 = 4.737893 if districtW4 == 10732
replace GB15_marginW4 = 7.657632 if districtW4 == 10733
replace GB15_marginW4 = 31.33052 if districtW4 == 10734
replace GB15_marginW4 = 9.417402 if districtW4 == 10735
replace GB15_marginW4 = 31.05202 if districtW4 == 10736
replace GB15_marginW4 = 34.84552 if districtW4 == 10737
replace GB15_marginW4 = 15.16 if districtW4 == 10738
replace GB15_marginW4 = 29.05325 if districtW4 == 10739
replace GB15_marginW4 = 28.48182 if districtW4 == 10740
replace GB15_marginW4 = 7.503524 if districtW4 == 10741
replace GB15_marginW4 = 45.93924 if districtW4 == 10742
replace GB15_marginW4 = 35.74074 if districtW4 == 10743
replace GB15_marginW4 = 38.21988 if districtW4 == 10744
replace GB15_marginW4 = 36.85492 if districtW4 == 10745
replace GB15_marginW4 = 27.75637 if districtW4 == 10746
replace GB15_marginW4 = 10.91722 if districtW4 == 10747
replace GB15_marginW4 = 9.635946 if districtW4 == 10748
replace GB15_marginW4 = 36.21671 if districtW4 == 10749
replace GB15_marginW4 = 31.04321 if districtW4 == 10750
replace GB15_marginW4 = 23.66934 if districtW4 == 10751
replace GB15_marginW4 = 19.13646 if districtW4 == 10752
replace GB15_marginW4 = 43.31664 if districtW4 == 10753
replace GB15_marginW4 = 33.6148 if districtW4 == 10754
replace GB15_marginW4 = 2.367181 if districtW4 == 10755
replace GB15_marginW4 = 18.14566 if districtW4 == 10756
replace GB15_marginW4 = 34.69344 if districtW4 == 10757
replace GB15_marginW4 = 10.25952 if districtW4 == 10758
replace GB15_marginW4 = 1.203713 if districtW4 == 10759
replace GB15_marginW4 = 38.09716 if districtW4 == 10760
replace GB15_marginW4 = 7.666242 if districtW4 == 10761
replace GB15_marginW4 = 19.49218 if districtW4 == 10762
replace GB15_marginW4 = 43.04749 if districtW4 == 10763
replace GB15_marginW4 = 28.70567 if districtW4 == 10764
replace GB15_marginW4 = 35.99471 if districtW4 == 10765
replace GB15_marginW4 = 6.215012 if districtW4 == 10766
replace GB15_marginW4 = 43.04482 if districtW4 == 10767
replace GB15_marginW4 = 21.13529 if districtW4 == 10768
replace GB15_marginW4 = 26.66356 if districtW4 == 10769
replace GB15_marginW4 = 4.782879 if districtW4 == 10770
replace GB15_marginW4 = 29.36205 if districtW4 == 10771
replace GB15_marginW4 = 36.50385 if districtW4 == 10772
replace GB15_marginW4 = 29.34629 if districtW4 == 10773
replace GB15_marginW4 = 18.71377 if districtW4 == 10774
replace GB15_marginW4 = 68.31533 if districtW4 == 10775
replace GB15_marginW4 = 3.030813 if districtW4 == 10776
replace GB15_marginW4 = 37.66427 if districtW4 == 10777
replace GB15_marginW4 = 32.81234 if districtW4 == 10778
replace GB15_marginW4 = 15.01315 if districtW4 == 10779
replace GB15_marginW4 = 6.704802 if districtW4 == 10780
replace GB15_marginW4 = 27.91817 if districtW4 == 10781
replace GB15_marginW4 = 38.17924 if districtW4 == 10782
replace GB15_marginW4 = 38.84245 if districtW4 == 10783
replace GB15_marginW4 = 20.86495 if districtW4 == 10784
replace GB15_marginW4 = 31.23906 if districtW4 == 10785
replace GB15_marginW4 = 2.142856 if districtW4 == 10786
replace GB15_marginW4 = 33.39235 if districtW4 == 10787
replace GB15_marginW4 = 26.4187 if districtW4 == 10788
replace GB15_marginW4 = 45.36752 if districtW4 == 10789
replace GB15_marginW4 = 36.64841 if districtW4 == 10790
replace GB15_marginW4 = 35.34109 if districtW4 == 10791
replace GB15_marginW4 = 3.079909 if districtW4 == 10792
replace GB15_marginW4 = 55.26738 if districtW4 == 10793
replace GB15_marginW4 = 72.33028 if districtW4 == 10794
replace GB15_marginW4 = 59.31322 if districtW4 == 10795
replace GB15_marginW4 = 66.69835 if districtW4 == 10796
replace GB15_marginW4 = 17.65283 if districtW4 == 10797
replace GB15_marginW4 = 29.75406 if districtW4 == 10798
replace GB15_marginW4 = 39.38372 if districtW4 == 10799
replace GB15_marginW4 = 22.32505 if districtW4 == 10800
replace GB15_marginW4 = 13.52805 if districtW4 == 10801
replace GB15_marginW4 = 29.86209 if districtW4 == 10802
replace GB15_marginW4 = 53.95785 if districtW4 == 10803
replace GB15_marginW4 = 21.41372 if districtW4 == 10804
replace GB15_marginW4 = 29.37171 if districtW4 == 10805
replace GB15_marginW4 = 45.9361 if districtW4 == 10806
replace GB15_marginW4 = 47.73555 if districtW4 == 10807
replace GB15_marginW4 = 57.30503 if districtW4 == 10808
replace GB15_marginW4 = 29.76624 if districtW4 == 10809
replace GB15_marginW4 = 11.26226 if districtW4 == 10810
replace GB15_marginW4 = 46.23818 if districtW4 == 10811
replace GB15_marginW4 = 35.7299 if districtW4 == 10812
replace GB15_marginW4 = 40.1774 if districtW4 == 10813
replace GB15_marginW4 = 26.76361 if districtW4 == 10814
replace GB15_marginW4 = 22.64565 if districtW4 == 10815
replace GB15_marginW4 = 33.08818 if districtW4 == 10816
replace GB15_marginW4 = 42.2424 if districtW4 == 10817
replace GB15_marginW4 = 39.31451 if districtW4 == 10818
replace GB15_marginW4 = 38.14896 if districtW4 == 10819
replace GB15_marginW4 = 4.9653 if districtW4 == 10820
replace GB15_marginW4 = 16.90529 if districtW4 == 10821
replace GB15_marginW4 = 14.71102 if districtW4 == 10822
replace GB15_marginW4 = 37.48615 if districtW4 == 10823
replace GB15_marginW4 = 46.16068 if districtW4 == 10824
replace GB15_marginW4 = 10.61468 if districtW4 == 10825
replace GB15_marginW4 = .8746117 if districtW4 == 10826
replace GB15_marginW4 = 38.75261 if districtW4 == 10827
replace GB15_marginW4 = 43.45919 if districtW4 == 10828
replace GB15_marginW4 = 35.32178 if districtW4 == 10829
replace GB15_marginW4 = 46.01746 if districtW4 == 10830
replace GB15_marginW4 = 36.12085 if districtW4 == 10831
replace GB15_marginW4 = 31.85457 if districtW4 == 10832
replace GB15_marginW4 = 22.617 if districtW4 == 10833
replace GB15_marginW4 = 1.511735 if districtW4 == 10834
replace GB15_marginW4 = 23.28145 if districtW4 == 10835
replace GB15_marginW4 = 33.6144 if districtW4 == 10836
replace GB15_marginW4 = 13.7237 if districtW4 == 10837
replace GB15_marginW4 = 13.25688 if districtW4 == 10838
replace GB15_marginW4 = 39.55793 if districtW4 == 10839
replace GB15_marginW4 = 33.98595 if districtW4 == 10840
replace GB15_marginW4 = 43.70739 if districtW4 == 10841
replace GB15_marginW4 = 32.58787 if districtW4 == 10842
replace GB15_marginW4 = 3.927171 if districtW4 == 10843
replace GB15_marginW4 = 55.4 if districtW4 == 10844
replace GB15_marginW4 = 36.49091 if districtW4 == 10845
replace GB15_marginW4 = 24.94424 if districtW4 == 10846
replace GB15_marginW4 = 41.63839 if districtW4 == 10847
replace GB15_marginW4 = 8.18189 if districtW4 == 10848
replace GB15_marginW4 = 31.37352 if districtW4 == 10849
replace GB15_marginW4 = 39.18937 if districtW4 == 10850
replace GB15_marginW4 = 22.56039 if districtW4 == 10851
replace GB15_marginW4 = 23.26738 if districtW4 == 10852
replace GB15_marginW4 = 36.72519 if districtW4 == 10853
replace GB15_marginW4 = 6.275198 if districtW4 == 10854
replace GB15_marginW4 = 32.39771 if districtW4 == 10855
replace GB15_marginW4 = 23.48545 if districtW4 == 10856
replace GB15_marginW4 = 43.37893 if districtW4 == 10857
replace GB15_marginW4 = 22.06293 if districtW4 == 10858
replace GB15_marginW4 = 29.44417 if districtW4 == 10859
replace GB15_marginW4 = 41.62909 if districtW4 == 10860
replace GB15_marginW4 = 8.233741 if districtW4 == 10861
replace GB15_marginW4 = 9.754655 if districtW4 == 10862
replace GB15_marginW4 = 10.23812 if districtW4 == 10863
replace GB15_marginW4 = 15.79349 if districtW4 == 10864
replace GB15_marginW4 = 33.78114 if districtW4 == 10865
replace GB15_marginW4 = 33.55686 if districtW4 == 10866
replace GB15_marginW4 = 15.95767 if districtW4 == 10867
replace GB15_marginW4 = 10.67127 if districtW4 == 10868
replace GB15_marginW4 = 33.80465 if districtW4 == 10869
replace GB15_marginW4 = 13.49279 if districtW4 == 10870
replace GB15_marginW4 = 34.16556 if districtW4 == 10871
replace GB15_marginW4 = 40.74686 if districtW4 == 10872
replace GB15_marginW4 = 30.14461 if districtW4 == 10873
replace GB15_marginW4 = 16.738 if districtW4 == 10874
replace GB15_marginW4 = 12.26827 if districtW4 == 10875
replace GB15_marginW4 = 14.34883 if districtW4 == 10876
replace GB15_marginW4 = 45.29496 if districtW4 == 10877
replace GB15_marginW4 = 4.089218 if districtW4 == 10878
replace GB15_marginW4 = 2.408111 if districtW4 == 10879
replace GB15_marginW4 = 1.090425 if districtW4 == 10880
replace GB15_marginW4 = 33.31504 if districtW4 == 10881
replace GB15_marginW4 = 33.15571 if districtW4 == 10882
replace GB15_marginW4 = 23.21437 if districtW4 == 10883
replace GB15_marginW4 = 12.50746 if districtW4 == 10884
replace GB15_marginW4 = 36.05426 if districtW4 == 10885
replace GB15_marginW4 = 8.83814 if districtW4 == 10886
replace GB15_marginW4 = 23.77783 if districtW4 == 10887
replace GB15_marginW4 = 32.37505 if districtW4 == 10888
replace GB15_marginW4 = 12.91243 if districtW4 == 10889
replace GB15_marginW4 = 13.73853 if districtW4 == 10890
replace GB15_marginW4 = 25.38674 if districtW4 == 10891
replace GB15_marginW4 = 15.99619 if districtW4 == 10892
replace GB15_marginW4 = 43.49452 if districtW4 == 10893
replace GB15_marginW4 = 26.04368 if districtW4 == 10894
replace GB15_marginW4 = 36.20437 if districtW4 == 10895
replace GB15_marginW4 = 38.94181 if districtW4 == 10896
replace GB15_marginW4 = 27.38719 if districtW4 == 10897
replace GB15_marginW4 = 13.58253 if districtW4 == 10898
replace GB15_marginW4 = 21.72996 if districtW4 == 10899
replace GB15_marginW4 = 28.1813 if districtW4 == 10900
replace GB15_marginW4 = 36.59655 if districtW4 == 10901
replace GB15_marginW4 = 11.53313 if districtW4 == 10902
replace GB15_marginW4 = 15.51926 if districtW4 == 10903
replace GB15_marginW4 = 22.33033 if districtW4 == 10904
replace GB15_marginW4 = 21.10966 if districtW4 == 10905
replace GB15_marginW4 = 39.48304 if districtW4 == 10906
replace GB15_marginW4 = 44.22201 if districtW4 == 10907
replace GB15_marginW4 = 25.06889 if districtW4 == 10908
replace GB15_marginW4 = 39.75056 if districtW4 == 10909
replace GB15_marginW4 = 43.41504 if districtW4 == 10910
replace GB15_marginW4 = 28.98916 if districtW4 == 10911
replace GB15_marginW4 = 40.27414 if districtW4 == 10912
replace GB15_marginW4 = 12.98729 if districtW4 == 10913
replace GB15_marginW4 = 8.483797 if districtW4 == 10914
replace GB15_marginW4 = 17.67486 if districtW4 == 10915
replace GB15_marginW4 = 24.16516 if districtW4 == 10916
replace GB15_marginW4 = 25.67419 if districtW4 == 10917
replace GB15_marginW4 = 39.02522 if districtW4 == 10918
replace GB15_marginW4 = 39.18457 if districtW4 == 10919
replace GB15_marginW4 = 29.53341 if districtW4 == 10920
replace GB15_marginW4 = 34.47182 if districtW4 == 10921
replace GB15_marginW4 = 4.241091 if districtW4 == 10922
replace GB15_marginW4 = 30.80765 if districtW4 == 10923
replace GB15_marginW4 = 9.166041 if districtW4 == 10924
replace GB15_marginW4 = 19.04159 if districtW4 == 10925
replace GB15_marginW4 = 17.67957 if districtW4 == 10926
replace GB15_marginW4 = 24.64255 if districtW4 == 10927
replace GB15_marginW4 = 38.05238 if districtW4 == 10928
replace GB15_marginW4 = 38.93032 if districtW4 == 10929
replace GB15_marginW4 = 15.19627 if districtW4 == 10930
replace GB15_marginW4 = 23.55282 if districtW4 == 10931
replace GB15_marginW4 = 33.60693 if districtW4 == 10932
replace GB15_marginW4 = 16.86882 if districtW4 == 10933
replace GB15_marginW4 = 33.46441 if districtW4 == 10934
replace GB15_marginW4 = 22.59761 if districtW4 == 10935
replace GB15_marginW4 = 24.68054 if districtW4 == 10936
replace GB15_marginW4 = 28.29463 if districtW4 == 10937
replace GB15_marginW4 = 33.6548 if districtW4 == 10938
replace GB15_marginW4 = 37.73244 if districtW4 == 10939
replace GB15_marginW4 = 31.19831 if districtW4 == 10940
replace GB15_marginW4 = 35.87522 if districtW4 == 10941
replace GB15_marginW4 = 43.40311 if districtW4 == 10942
replace GB15_marginW4 = 11.35192 if districtW4 == 10943
replace GB15_marginW4 = 29.26789 if districtW4 == 10944
replace GB15_marginW4 = 41.07222 if districtW4 == 10945
replace GB15_marginW4 = 33.80084 if districtW4 == 10946
replace GB15_marginW4 = 11.74309 if districtW4 == 10947
replace GB15_marginW4 = 5.692193 if districtW4 == 10948
replace GB15_marginW4 = 34.72049 if districtW4 == 10949
replace GB15_marginW4 = 39.92099 if districtW4 == 10950
replace GB15_marginW4 = 40.622 if districtW4 == 10951
replace GB15_marginW4 = 27.66115 if districtW4 == 10952
replace GB15_marginW4 = 49.99387 if districtW4 == 10953
replace GB15_marginW4 = 35.17998 if districtW4 == 10954
replace GB15_marginW4 = 5.180052 if districtW4 == 10955
replace GB15_marginW4 = 8.728123 if districtW4 == 10956
replace GB15_marginW4 = 31.5015 if districtW4 == 10957
replace GB15_marginW4 = 2.997663 if districtW4 == 10958
replace GB15_marginW4 = 28.83514 if districtW4 == 10959
replace GB15_marginW4 = 23.39022 if districtW4 == 10960
replace GB15_marginW4 = 16.22883 if districtW4 == 10961
replace GB15_marginW4 = 37.3811 if districtW4 == 10962
replace GB15_marginW4 = 43.89322 if districtW4 == 10963
replace GB15_marginW4 = 5.110532 if districtW4 == 10964
replace GB15_marginW4 = 18.81805 if districtW4 == 10965
replace GB15_marginW4 = 23.88992 if districtW4 == 10966
replace GB15_marginW4 = 16.29381 if districtW4 == 10967
replace GB15_marginW4 = 10.36632 if districtW4 == 10968
replace GB15_marginW4 = 25.37517 if districtW4 == 10969
replace GB15_marginW4 = 21.14427 if districtW4 == 10970
replace GB15_marginW4 = 9.741879 if districtW4 == 10971
replace GB15_marginW4 = 16.66131 if districtW4 == 10972
replace GB15_marginW4 = 12.511 if districtW4 == 10973
replace GB15_marginW4 = 6.492442 if districtW4 == 10974
replace GB15_marginW4 = 34.55168 if districtW4 == 10975
replace GB15_marginW4 = 14.54301 if districtW4 == 10976
replace GB15_marginW4 = 44.45481 if districtW4 == 10977
replace GB15_marginW4 = 27.9054 if districtW4 == 10978
replace GB15_marginW4 = 25.19079 if districtW4 == 10979
replace GB15_marginW4 = 8.000792 if districtW4 == 10980
replace GB15_marginW4 = 33.89214 if districtW4 == 10981
replace GB15_marginW4 = 26.76835 if districtW4 == 10982
replace GB15_marginW4 = 45.56962 if districtW4 == 10983
replace GB15_marginW4 = 7.856929 if districtW4 == 10984
replace GB15_marginW4 = 32.28262 if districtW4 == 10985
replace GB15_marginW4 = 23.95811 if districtW4 == 10986
replace GB15_marginW4 = 40.26889 if districtW4 == 10987
replace GB15_marginW4 = 26.76076 if districtW4 == 10988
replace GB15_marginW4 = 1.79604 if districtW4 == 10989
replace GB15_marginW4 = 39.70078 if districtW4 == 10990
replace GB15_marginW4 = 37.90037 if districtW4 == 10991
replace GB15_marginW4 = 23.64373 if districtW4 == 10992
replace GB15_marginW4 = 37.15459 if districtW4 == 10993
replace GB15_marginW4 = 3.078032 if districtW4 == 10994
replace GB15_marginW4 = 1.081431 if districtW4 == 10995
replace GB15_marginW4 = 37.52209 if districtW4 == 10996
replace GB15_marginW4 = 44.2221 if districtW4 == 10997
replace GB15_marginW4 = 5.309272 if districtW4 == 10998
replace GB15_marginW4 = 6.834584 if districtW4 == 10999
replace GB15_marginW4 = 32.52333 if districtW4 == 11000
replace GB15_marginW4 = 38.82413 if districtW4 == 11001
replace GB15_marginW4 = 55.36914 if districtW4 == 11002
replace GB15_marginW4 = 27.16126 if districtW4 == 11003
replace GB15_marginW4 = 44.47771 if districtW4 == 11004
replace GB15_marginW4 = 3.253016 if districtW4 == 11005
replace GB15_marginW4 = 15.40331 if districtW4 == 11006
replace GB15_marginW4 = 23.86691 if districtW4 == 11007
replace GB15_marginW4 = 26.50759 if districtW4 == 11008
replace GB15_marginW4 = 6.080562 if districtW4 == 11009
replace GB15_marginW4 = 37.69774 if districtW4 == 11010
replace GB15_marginW4 = 5.251741 if districtW4 == 11011
replace GB15_marginW4 = 14.35776 if districtW4 == 11012
replace GB15_marginW4 = 55.49574 if districtW4 == 11013
replace GB15_marginW4 = 28.24179 if districtW4 == 11014
replace GB15_marginW4 = 37.29252 if districtW4 == 11015
replace GB15_marginW4 = 38.86436 if districtW4 == 11016
replace GB15_marginW4 = 19.64596 if districtW4 == 11017
replace GB15_marginW4 = 4.633296 if districtW4 == 11018
replace GB15_marginW4 = 13.06024 if districtW4 == 11019
replace GB15_marginW4 = 35.31417 if districtW4 == 11020
replace GB15_marginW4 = 17.44288 if districtW4 == 11021
replace GB15_marginW4 = 4.613379 if districtW4 == 11022
replace GB15_marginW4 = 40.28097 if districtW4 == 11023
replace GB15_marginW4 = 1.719761 if districtW4 == 11024
replace GB15_marginW4 = 32.51437 if districtW4 == 11025
replace GB15_marginW4 = 13.32947 if districtW4 == 11026
replace GB15_marginW4 = 24.20675 if districtW4 == 11027
replace GB15_marginW4 = 32.04056 if districtW4 == 11028
replace GB15_marginW4 = 25.25872 if districtW4 == 11029
replace GB15_marginW4 = 22.10358 if districtW4 == 11030
replace GB15_marginW4 = 28.56991 if districtW4 == 11031
replace GB15_marginW4 = 53.01081 if districtW4 == 11032
replace GB15_marginW4 = 16.82905 if districtW4 == 11033
replace GB15_marginW4 = 30.43549 if districtW4 == 11034
replace GB15_marginW4 = 41.73383 if districtW4 == 11035
replace GB15_marginW4 = 5.003291 if districtW4 == 11036
replace GB15_marginW4 = 18.28977 if districtW4 == 11037
replace GB15_marginW4 = 29.70201 if districtW4 == 11038
replace GB15_marginW4 = 31.4309 if districtW4 == 11039
replace GB15_marginW4 = 26.06047 if districtW4 == 11040
replace GB15_marginW4 = 30.57705 if districtW4 == 11041
replace GB15_marginW4 = 50.00598 if districtW4 == 11042
replace GB15_marginW4 = 10.99266 if districtW4 == 11043
replace GB15_marginW4 = .9962261 if districtW4 == 11044
replace GB15_marginW4 = 41.45607 if districtW4 == 11045
replace GB15_marginW4 = 43.01324 if districtW4 == 11046
replace GB15_marginW4 = 40.04696 if districtW4 == 11047
replace GB15_marginW4 = 43.2097 if districtW4 == 11048
replace GB15_marginW4 = 16.16034 if districtW4 == 11049
replace GB15_marginW4 = 31.00334 if districtW4 == 11050
replace GB15_marginW4 = 1.992092 if districtW4 == 11051
replace GB15_marginW4 = 11.35491 if districtW4 == 11052
replace GB15_marginW4 = 12.18314 if districtW4 == 11053
replace GB15_marginW4 = 14.14098 if districtW4 == 11054
replace GB15_marginW4 = 33.20332 if districtW4 == 11055
replace GB15_marginW4 = 28.88081 if districtW4 == 11056
replace GB15_marginW4 = 28.36269 if districtW4 == 11057
replace GB15_marginW4 = 26.03358 if districtW4 == 11058
replace GB15_marginW4 = 24.42965 if districtW4 == 11059
replace GB15_marginW4 = 9.332022 if districtW4 == 11060
replace GB15_marginW4 = 14.08646 if districtW4 == 11061
replace GB15_marginW4 = 24.35671 if districtW4 == 11062
replace GB15_marginW4 = 6.54453 if districtW4 == 40001
replace GB15_marginW4 = 13.12049 if districtW4 == 40002
replace GB15_marginW4 = 2.325641 if districtW4 == 40003
replace GB15_marginW4 = 34.99957 if districtW4 == 40004
replace GB15_marginW4 = 17.30006 if districtW4 == 40005
replace GB15_marginW4 = 22.48084 if districtW4 == 40006
replace GB15_marginW4 = 1.041993 if districtW4 == 40007
replace GB15_marginW4 = 16.33966 if districtW4 == 40008
replace GB15_marginW4 = 32.66742 if districtW4 == 40009
replace GB15_marginW4 = 33.2755 if districtW4 == 40010
replace GB15_marginW4 = 8.372599 if districtW4 == 40011
replace GB15_marginW4 = 27.55148 if districtW4 == 40012
replace GB15_marginW4 = 25.5988 if districtW4 == 40013
replace GB15_marginW4 = 2.598363 if districtW4 == 40014
replace GB15_marginW4 = 13.79722 if districtW4 == 40015
replace GB15_marginW4 = 30.02299 if districtW4 == 40016
replace GB15_marginW4 = 4.794681 if districtW4 == 40017
replace GB15_marginW4 = 26.02577 if districtW4 == 40018
replace GB15_marginW4 = 30.48981 if districtW4 == 20001
replace GB15_marginW4 = 14.89156 if districtW4 == 20002
replace GB15_marginW4 = 19.82342 if districtW4 == 20003
replace GB15_marginW4 = 25.24446 if districtW4 == 20004
replace GB15_marginW4 = 16.33097 if districtW4 == 20005
replace GB15_marginW4 = 21.57674 if districtW4 == 20006
replace GB15_marginW4 = 31.42519 if districtW4 == 20007
replace GB15_marginW4 = .5959511 if districtW4 == 20008
replace GB15_marginW4 = 11.24437 if districtW4 == 20009
replace GB15_marginW4 = 26.7637 if districtW4 == 20010
replace GB15_marginW4 = 22.68532 if districtW4 == 20011
replace GB15_marginW4 = 29.87323 if districtW4 == 20012
replace GB15_marginW4 = 11.50843 if districtW4 == 20013
replace GB15_marginW4 = 1.530668 if districtW4 == 20014
replace GB15_marginW4 = 39.76756 if districtW4 == 20015
replace GB15_marginW4 = 38.22517 if districtW4 == 20016
replace GB15_marginW4 = 18.5221 if districtW4 == 20017
replace GB15_marginW4 = 3.949264 if districtW4 == 20018
replace GB15_marginW4 = 27.29976 if districtW4 == 20019
replace GB15_marginW4 = 11.52777 if districtW4 == 20020
replace GB15_marginW4 = 6.553853 if districtW4 == 20021
replace GB15_marginW4 = 19.33785 if districtW4 == 20022
replace GB15_marginW4 = 9.648668 if districtW4 == 20023
replace GB15_marginW4 = 5.350402 if districtW4 == 20024
replace GB15_marginW4 = 15.76489 if districtW4 == 20025
replace GB15_marginW4 = 5.851471 if districtW4 == 20026
replace GB15_marginW4 = 25.73723 if districtW4 == 20027
replace GB15_marginW4 = 32.64998 if districtW4 == 20028
replace GB15_marginW4 = 19.48726 if districtW4 == 20029
replace GB15_marginW4 = 24.48782 if districtW4 == 20030
replace GB15_marginW4 = 25.17469 if districtW4 == 20031
replace GB15_marginW4 = 24.36009 if districtW4 == 20032
replace GB15_marginW4 = 23.63297 if districtW4 == 20033
replace GB15_marginW4 = 25.15273 if districtW4 == 20034
replace GB15_marginW4 = 24.31515 if districtW4 == 20035
replace GB15_marginW4 = 29.1966 if districtW4 == 20036
replace GB15_marginW4 = 14.93612 if districtW4 == 20037
replace GB15_marginW4 = 24.80104 if districtW4 == 20038
replace GB15_marginW4 = 18.76139 if districtW4 == 20039
replace GB15_marginW4 = 25.301 if districtW4 == 20040
replace GB15_marginW4 = 18.8573 if districtW4 == 20041
replace GB15_marginW4 = 18.27789 if districtW4 == 20042
replace GB15_marginW4 = 20.99778 if districtW4 == 20043
replace GB15_marginW4 = 29.26825 if districtW4 == 20044
replace GB15_marginW4 = 20.39891 if districtW4 == 20045
replace GB15_marginW4 = 18.39488 if districtW4 == 20046
replace GB15_marginW4 = 24.66571 if districtW4 == 20047
replace GB15_marginW4 = 25.19631 if districtW4 == 20048
replace GB15_marginW4 = 9.597242 if districtW4 == 20049
replace GB15_marginW4 = 17.57011 if districtW4 == 20050
replace GB15_marginW4 = 3.594685 if districtW4 == 20051
replace GB15_marginW4 = 17.98581 if districtW4 == 20052
replace GB15_marginW4 = 12.29611 if districtW4 == 20053
replace GB15_marginW4 = 17.78782 if districtW4 == 20054
replace GB15_marginW4 = 12.25515 if districtW4 == 20055
replace GB15_marginW4 = 17.3132 if districtW4 == 20056
replace GB15_marginW4 = 20.10166 if districtW4 == 20057
replace GB15_marginW4 = 12.74187 if districtW4 == 20058
replace GB15_marginW4 = 27.70967 if districtW4 == 20059
replace GB15_marginW4 = .655672 if districtW4 == 30041
replace GB15_marginW4 = 7.822305 if districtW4 == 30042
replace GB15_marginW4 = 8.091688 if districtW4 == 30043
replace GB15_marginW4 = 5.596137 if districtW4 == 30044
replace GB15_marginW4 = 18.39322 if districtW4 == 30045
replace GB15_marginW4 = .0631452 if districtW4 == 30046
replace GB15_marginW4 = 20.01365 if districtW4 == 30047
replace GB15_marginW4 = 35.77845 if districtW4 == 30048
replace GB15_marginW4 = 33.13454 if districtW4 == 30049
replace GB15_marginW4 = 12.88878 if districtW4 == 30050
replace GB15_marginW4 = 4.177827 if districtW4 == 30051
replace GB15_marginW4 = 23.63815 if districtW4 == 30052
replace GB15_marginW4 = 21.53307 if districtW4 == 30053
replace GB15_marginW4 = 23.13851 if districtW4 == 30054
replace GB15_marginW4 = 13.40151 if districtW4 == 30055
replace GB15_marginW4 = 8.699531 if districtW4 == 30056
replace GB15_marginW4 = 13.6677 if districtW4 == 30057
replace GB15_marginW4 = 13.26456 if districtW4 == 30058
replace GB15_marginW4 = 17.69749 if districtW4 == 30059
replace GB15_marginW4 = .6721318 if districtW4 == 30060
replace GB15_marginW4 = 18.19597 if districtW4 == 30061
replace GB15_marginW4 = 6.850332 if districtW4 == 30062
replace GB15_marginW4 = 15.77451 if districtW4 == 30063
replace GB15_marginW4 = 8.197027 if districtW4 == 30064
replace GB15_marginW4 = 12.25219 if districtW4 == 30065
replace GB15_marginW4 = 15.00372 if districtW4 == 30066
replace GB15_marginW4 = 14.21102 if districtW4 == 30067
replace GB15_marginW4 = 12.73145 if districtW4 == 30068
replace GB15_marginW4 = 25.71159 if districtW4 == 30069
replace GB15_marginW4 = 30.86768 if districtW4 == 30070
replace GB15_marginW4 = 35.19181 if districtW4 == 30071
replace GB15_marginW4 = 40.09406 if districtW4 == 30072
replace GB15_marginW4 = 4.884291 if districtW4 == 30073
replace GB15_marginW4 = 37.00142 if districtW4 == 30074
replace GB15_marginW4 = 23.71839 if districtW4 == 30075
replace GB15_marginW4 = 25.00558 if districtW4 == 30076
replace GB15_marginW4 = 29.389 if districtW4 == 30077
replace GB15_marginW4 = 13.41314 if districtW4 == 30078
replace GB15_marginW4 = 15.50283 if districtW4 == 30079
replace GB15_marginW4 = 15.9706 if districtW4 == 30080

gen GB15_marginW5 = .

replace GB15_marginW5 = 32.25953 if districtW5 == 10530
replace GB15_marginW5 = 29.68074 if districtW5 == 10531
replace GB15_marginW5 = 26.30798 if districtW5 == 10532
replace GB15_marginW5 = 9.197891 if districtW5 == 10533
replace GB15_marginW5 = 46.34984 if districtW5 == 10534
replace GB15_marginW5 = 18.60406 if districtW5 == 10535
replace GB15_marginW5 = 33.63313 if districtW5 == 10536
replace GB15_marginW5 = 27.6376 if districtW5 == 10537
replace GB15_marginW5 = 30.9605 if districtW5 == 10538
replace GB15_marginW5 = 31.71114 if districtW5 == 10539
replace GB15_marginW5 = 35.48244 if districtW5 == 10540
replace GB15_marginW5 = 34.01258 if districtW5 == 10541
replace GB15_marginW5 = 31.24334 if districtW5 == 10542
replace GB15_marginW5 = 1.837087 if districtW5 == 10543
replace GB15_marginW5 = 29.00902 if districtW5 == 10544
replace GB15_marginW5 = 20.84369 if districtW5 == 10545
replace GB15_marginW5 = 17.94112 if districtW5 == 10546
replace GB15_marginW5 = 8.126444 if districtW5 == 10547
replace GB15_marginW5 = 11.99905 if districtW5 == 10548
replace GB15_marginW5 = 15.55525 if districtW5 == 10549
replace GB15_marginW5 = 49.49119 if districtW5 == 10550
replace GB15_marginW5 = 37.84808 if districtW5 == 10551
replace GB15_marginW5 = 2.380332 if districtW5 == 10552
replace GB15_marginW5 = 8.729386 if districtW5 == 10553
replace GB15_marginW5 = 12.15645 if districtW5 == 10554
replace GB15_marginW5 = 45.94701 if districtW5 == 10555
replace GB15_marginW5 = 23.16571 if districtW5 == 10556
replace GB15_marginW5 = 36.3559 if districtW5 == 10557
replace GB15_marginW5 = 21.04155 if districtW5 == 10558
replace GB15_marginW5 = 52.75904 if districtW5 == 10559
replace GB15_marginW5 = 6.553167 if districtW5 == 10560
replace GB15_marginW5 = 14.7878 if districtW5 == 10561
replace GB15_marginW5 = 42.12473 if districtW5 == 10562
replace GB15_marginW5 = 56.92634 if districtW5 == 10563
replace GB15_marginW5 = 60.88651 if districtW5 == 10564
replace GB15_marginW5 = 5.908951 if districtW5 == 10565
replace GB15_marginW5 = 35.93795 if districtW5 == 10566
replace GB15_marginW5 = 18.64927 if districtW5 == 10567
replace GB15_marginW5 = 16.02634 if districtW5 == 10568
replace GB15_marginW5 = 8.906039 if districtW5 == 10569
replace GB15_marginW5 = 29.00066 if districtW5 == 10570
replace GB15_marginW5 = 45.46777 if districtW5 == 10571
replace GB15_marginW5 = 8.478665 if districtW5 == 10572
replace GB15_marginW5 = 7.969541 if districtW5 == 10573
replace GB15_marginW5 = 31.66058 if districtW5 == 10574
replace GB15_marginW5 = 23.99574 if districtW5 == 10575
replace GB15_marginW5 = 29.59504 if districtW5 == 10576
replace GB15_marginW5 = 26.7694 if districtW5 == 10577
replace GB15_marginW5 = 10.1411 if districtW5 == 10578
replace GB15_marginW5 = 26.82179 if districtW5 == 10579
replace GB15_marginW5 = 1.64842 if districtW5 == 10580
replace GB15_marginW5 = 63.57193 if districtW5 == 10581
replace GB15_marginW5 = 10.00485 if districtW5 == 10582
replace GB15_marginW5 = 20.50689 if districtW5 == 10583
replace GB15_marginW5 = 32.59642 if districtW5 == 10584
replace GB15_marginW5 = 29.70819 if districtW5 == 10585
replace GB15_marginW5 = 38.89915 if districtW5 == 10586
replace GB15_marginW5 = 17.10863 if districtW5 == 10587
replace GB15_marginW5 = 17.15425 if districtW5 == 10588
replace GB15_marginW5 = 28.3445 if districtW5 == 10589
replace GB15_marginW5 = 35.02178 if districtW5 == 10590
replace GB15_marginW5 = 41.77794 if districtW5 == 10591
replace GB15_marginW5 = 20.74088 if districtW5 == 10592
replace GB15_marginW5 = .8107394 if districtW5 == 10593
replace GB15_marginW5 = 42.02555 if districtW5 == 10594
replace GB15_marginW5 = 26.78385 if districtW5 == 10595
replace GB15_marginW5 = 25.82852 if districtW5 == 10596
replace GB15_marginW5 = 1.522979 if districtW5 == 10597
replace GB15_marginW5 = 14.57129 if districtW5 == 10598
replace GB15_marginW5 = 8.612296 if districtW5 == 10599
replace GB15_marginW5 = 9.543478 if districtW5 == 10600
replace GB15_marginW5 = 14.01991 if districtW5 == 10601
replace GB15_marginW5 = 8.833972 if districtW5 == 10602
replace GB15_marginW5 = 31.71655 if districtW5 == 10603
replace GB15_marginW5 = 30.7811 if districtW5 == 10604
replace GB15_marginW5 = 31.63747 if districtW5 == 10605
replace GB15_marginW5 = 36.33539 if districtW5 == 10606
replace GB15_marginW5 = 8.022081 if districtW5 == 10607
replace GB15_marginW5 = 42.72889 if districtW5 == 10608
replace GB15_marginW5 = 8.161828 if districtW5 == 10609
replace GB15_marginW5 = 22.24037 if districtW5 == 10610
replace GB15_marginW5 = .8357286 if districtW5 == 10611
replace GB15_marginW5 = 10.42465 if districtW5 == 10612
replace GB15_marginW5 = 35.89592 if districtW5 == 10613
replace GB15_marginW5 = 8.268431 if districtW5 == 10614
replace GB15_marginW5 = 50.08437 if districtW5 == 10615
replace GB15_marginW5 = 15.26991 if districtW5 == 10616
replace GB15_marginW5 = 1.15695 if districtW5 == 10617
replace GB15_marginW5 = 10.45245 if districtW5 == 10618
replace GB15_marginW5 = 18.32601 if districtW5 == 10619
replace GB15_marginW5 = 6.513724 if districtW5 == 10620
replace GB15_marginW5 = 3.171402 if districtW5 == 10621
replace GB15_marginW5 = 19.65676 if districtW5 == 10622
replace GB15_marginW5 = 39.05561 if districtW5 == 10623
replace GB15_marginW5 = 37.24232 if districtW5 == 10624
replace GB15_marginW5 = 32.397 if districtW5 == 10625
replace GB15_marginW5 = 26.59439 if districtW5 == 10626
replace GB15_marginW5 = 12.15369 if districtW5 == 10627
replace GB15_marginW5 = 33.91122 if districtW5 == 10628
replace GB15_marginW5 = 39.82996 if districtW5 == 10629
replace GB15_marginW5 = 12.12617 if districtW5 == 10630
replace GB15_marginW5 = 45.36317 if districtW5 == 10631
replace GB15_marginW5 = 29.84177 if districtW5 == 10632
replace GB15_marginW5 = 42.72563 if districtW5 == 10633
replace GB15_marginW5 = 19.14437 if districtW5 == 10634
replace GB15_marginW5 = 18.18543 if districtW5 == 10635
replace GB15_marginW5 = 14.44174 if districtW5 == 10636
replace GB15_marginW5 = 8.760056 if districtW5 == 10637
replace GB15_marginW5 = 36.66285 if districtW5 == 10638
replace GB15_marginW5 = 26.72655 if districtW5 == 10639
replace GB15_marginW5 = .1817793 if districtW5 == 10640
replace GB15_marginW5 = 25.04763 if districtW5 == 10641
replace GB15_marginW5 = 7.774785 if districtW5 == 10642
replace GB15_marginW5 = 17.50538 if districtW5 == 10643
replace GB15_marginW5 = 11.47285 if districtW5 == 10644
replace GB15_marginW5 = 9.468311 if districtW5 == 10645
replace GB15_marginW5 = 32.90372 if districtW5 == 10646
replace GB15_marginW5 = 6.469682 if districtW5 == 10647
replace GB15_marginW5 = 4.293802 if districtW5 == 10648
replace GB15_marginW5 = 29.06396 if districtW5 == 10649
replace GB15_marginW5 = 9.965524 if districtW5 == 10650
replace GB15_marginW5 = 7.295361 if districtW5 == 10651
replace GB15_marginW5 = 13.44181 if districtW5 == 10652
replace GB15_marginW5 = 7.255089 if districtW5 == 10653
replace GB15_marginW5 = .3116697 if districtW5 == 10654
replace GB15_marginW5 = 39.91629 if districtW5 == 10655
replace GB15_marginW5 = 29.6992 if districtW5 == 10656
replace GB15_marginW5 = 11.56794 if districtW5 == 10657
replace GB15_marginW5 = 7.676041 if districtW5 == 10658
replace GB15_marginW5 = 23.55107 if districtW5 == 10659
replace GB15_marginW5 = 40.09863 if districtW5 == 10660
replace GB15_marginW5 = 27.17355 if districtW5 == 10661
replace GB15_marginW5 = .0916302 if districtW5 == 10662
replace GB15_marginW5 = 21.62665 if districtW5 == 10663
replace GB15_marginW5 = 29.65309 if districtW5 == 10664
replace GB15_marginW5 = 42.34379 if districtW5 == 10665
replace GB15_marginW5 = 2.705577 if districtW5 == 10666
replace GB15_marginW5 = 20.91277 if districtW5 == 10667
replace GB15_marginW5 = 24.97031 if districtW5 == 10668
replace GB15_marginW5 = 29.82203 if districtW5 == 10669
replace GB15_marginW5 = 12.53186 if districtW5 == 10670
replace GB15_marginW5 = 11.00495 if districtW5 == 10671
replace GB15_marginW5 = 11.17509 if districtW5 == 10672
replace GB15_marginW5 = 31.38897 if districtW5 == 10673
replace GB15_marginW5 = .538373 if districtW5 == 10674
replace GB15_marginW5 = 25.40919 if districtW5 == 10675
replace GB15_marginW5 = 43.30463 if districtW5 == 10676
replace GB15_marginW5 = 42.28569 if districtW5 == 10677
replace GB15_marginW5 = 22.40803 if districtW5 == 10678
replace GB15_marginW5 = 65.50392 if districtW5 == 10679
replace GB15_marginW5 = 48.68826 if districtW5 == 10680
replace GB15_marginW5 = 40.38643 if districtW5 == 10681
replace GB15_marginW5 = 29.95912 if districtW5 == 10682
replace GB15_marginW5 = 29.87138 if districtW5 == 10683
replace GB15_marginW5 = 1.38545 if districtW5 == 10684
replace GB15_marginW5 = 16.4796 if districtW5 == 10685
replace GB15_marginW5 = 27.39905 if districtW5 == 10686
replace GB15_marginW5 = 37.29982 if districtW5 == 10687
replace GB15_marginW5 = 13.42907 if districtW5 == 10688
replace GB15_marginW5 = 14.68934 if districtW5 == 10689
replace GB15_marginW5 = 6.240007 if districtW5 == 10690
replace GB15_marginW5 = 2.353859 if districtW5 == 10691
replace GB15_marginW5 = 10.37501 if districtW5 == 10692
replace GB15_marginW5 = 36.43106 if districtW5 == 10693
replace GB15_marginW5 = 42.77515 if districtW5 == 10694
replace GB15_marginW5 = 7.416913 if districtW5 == 10695
replace GB15_marginW5 = 22.35024 if districtW5 == 10696
replace GB15_marginW5 = 50.22466 if districtW5 == 10697
replace GB15_marginW5 = 13.29742 if districtW5 == 10698
replace GB15_marginW5 = 40.69836 if districtW5 == 10699
replace GB15_marginW5 = 36.3557 if districtW5 == 10700
replace GB15_marginW5 = 23.2021 if districtW5 == 10701
replace GB15_marginW5 = 20.03625 if districtW5 == 10702
replace GB15_marginW5 = 11.15467 if districtW5 == 10703
replace GB15_marginW5 = 25.08089 if districtW5 == 10704
replace GB15_marginW5 = 22.187 if districtW5 == 10705
replace GB15_marginW5 = 30.36022 if districtW5 == 10706
replace GB15_marginW5 = 31.36152 if districtW5 == 10707
replace GB15_marginW5 = 55.41923 if districtW5 == 10708
replace GB15_marginW5 = 38.95755 if districtW5 == 10709
replace GB15_marginW5 = 6.221092 if districtW5 == 10710
replace GB15_marginW5 = 22.36714 if districtW5 == 10711
replace GB15_marginW5 = 13.79173 if districtW5 == 10712
replace GB15_marginW5 = 35.87119 if districtW5 == 10713
replace GB15_marginW5 = 35.32508 if districtW5 == 10714
replace GB15_marginW5 = 16.69359 if districtW5 == 10715
replace GB15_marginW5 = 13.45943 if districtW5 == 10716
replace GB15_marginW5 = 13.83885 if districtW5 == 10717
replace GB15_marginW5 = 25.57154 if districtW5 == 10718
replace GB15_marginW5 = 41.58115 if districtW5 == 10719
replace GB15_marginW5 = 48.12476 if districtW5 == 10720
replace GB15_marginW5 = 50.88903 if districtW5 == 10721
replace GB15_marginW5 = 7.03364 if districtW5 == 10722
replace GB15_marginW5 = .9782195 if districtW5 == 10723
replace GB15_marginW5 = 33.21574 if districtW5 == 10724
replace GB15_marginW5 = 45.05475 if districtW5 == 10725
replace GB15_marginW5 = 13.59049 if districtW5 == 10726
replace GB15_marginW5 = 2.108812 if districtW5 == 10727
replace GB15_marginW5 = 37.41496 if districtW5 == 10728
replace GB15_marginW5 = 18.86963 if districtW5 == 10729
replace GB15_marginW5 = 30.67109 if districtW5 == 10730
replace GB15_marginW5 = 9.708163 if districtW5 == 10731
replace GB15_marginW5 = 4.737893 if districtW5 == 10732
replace GB15_marginW5 = 7.657632 if districtW5 == 10733
replace GB15_marginW5 = 31.33052 if districtW5 == 10734
replace GB15_marginW5 = 9.417402 if districtW5 == 10735
replace GB15_marginW5 = 31.05202 if districtW5 == 10736
replace GB15_marginW5 = 34.84552 if districtW5 == 10737
replace GB15_marginW5 = 15.16 if districtW5 == 10738
replace GB15_marginW5 = 29.05325 if districtW5 == 10739
replace GB15_marginW5 = 28.48182 if districtW5 == 10740
replace GB15_marginW5 = 7.503524 if districtW5 == 10741
replace GB15_marginW5 = 45.93924 if districtW5 == 10742
replace GB15_marginW5 = 35.74074 if districtW5 == 10743
replace GB15_marginW5 = 38.21988 if districtW5 == 10744
replace GB15_marginW5 = 36.85492 if districtW5 == 10745
replace GB15_marginW5 = 27.75637 if districtW5 == 10746
replace GB15_marginW5 = 10.91722 if districtW5 == 10747
replace GB15_marginW5 = 9.635946 if districtW5 == 10748
replace GB15_marginW5 = 36.21671 if districtW5 == 10749
replace GB15_marginW5 = 31.04321 if districtW5 == 10750
replace GB15_marginW5 = 23.66934 if districtW5 == 10751
replace GB15_marginW5 = 19.13646 if districtW5 == 10752
replace GB15_marginW5 = 43.31664 if districtW5 == 10753
replace GB15_marginW5 = 33.6148 if districtW5 == 10754
replace GB15_marginW5 = 2.367181 if districtW5 == 10755
replace GB15_marginW5 = 18.14566 if districtW5 == 10756
replace GB15_marginW5 = 34.69344 if districtW5 == 10757
replace GB15_marginW5 = 10.25952 if districtW5 == 10758
replace GB15_marginW5 = 1.203713 if districtW5 == 10759
replace GB15_marginW5 = 38.09716 if districtW5 == 10760
replace GB15_marginW5 = 7.666242 if districtW5 == 10761
replace GB15_marginW5 = 19.49218 if districtW5 == 10762
replace GB15_marginW5 = 43.04749 if districtW5 == 10763
replace GB15_marginW5 = 28.70567 if districtW5 == 10764
replace GB15_marginW5 = 35.99471 if districtW5 == 10765
replace GB15_marginW5 = 6.215012 if districtW5 == 10766
replace GB15_marginW5 = 43.04482 if districtW5 == 10767
replace GB15_marginW5 = 21.13529 if districtW5 == 10768
replace GB15_marginW5 = 26.66356 if districtW5 == 10769
replace GB15_marginW5 = 4.782879 if districtW5 == 10770
replace GB15_marginW5 = 29.36205 if districtW5 == 10771
replace GB15_marginW5 = 36.50385 if districtW5 == 10772
replace GB15_marginW5 = 29.34629 if districtW5 == 10773
replace GB15_marginW5 = 18.71377 if districtW5 == 10774
replace GB15_marginW5 = 68.31533 if districtW5 == 10775
replace GB15_marginW5 = 3.030813 if districtW5 == 10776
replace GB15_marginW5 = 37.66427 if districtW5 == 10777
replace GB15_marginW5 = 32.81234 if districtW5 == 10778
replace GB15_marginW5 = 15.01315 if districtW5 == 10779
replace GB15_marginW5 = 6.704802 if districtW5 == 10780
replace GB15_marginW5 = 27.91817 if districtW5 == 10781
replace GB15_marginW5 = 38.17924 if districtW5 == 10782
replace GB15_marginW5 = 38.84245 if districtW5 == 10783
replace GB15_marginW5 = 20.86495 if districtW5 == 10784
replace GB15_marginW5 = 31.23906 if districtW5 == 10785
replace GB15_marginW5 = 2.142856 if districtW5 == 10786
replace GB15_marginW5 = 33.39235 if districtW5 == 10787
replace GB15_marginW5 = 26.4187 if districtW5 == 10788
replace GB15_marginW5 = 45.36752 if districtW5 == 10789
replace GB15_marginW5 = 36.64841 if districtW5 == 10790
replace GB15_marginW5 = 35.34109 if districtW5 == 10791
replace GB15_marginW5 = 3.079909 if districtW5 == 10792
replace GB15_marginW5 = 55.26738 if districtW5 == 10793
replace GB15_marginW5 = 72.33028 if districtW5 == 10794
replace GB15_marginW5 = 59.31322 if districtW5 == 10795
replace GB15_marginW5 = 66.69835 if districtW5 == 10796
replace GB15_marginW5 = 17.65283 if districtW5 == 10797
replace GB15_marginW5 = 29.75406 if districtW5 == 10798
replace GB15_marginW5 = 39.38372 if districtW5 == 10799
replace GB15_marginW5 = 22.32505 if districtW5 == 10800
replace GB15_marginW5 = 13.52805 if districtW5 == 10801
replace GB15_marginW5 = 29.86209 if districtW5 == 10802
replace GB15_marginW5 = 53.95785 if districtW5 == 10803
replace GB15_marginW5 = 21.41372 if districtW5 == 10804
replace GB15_marginW5 = 29.37171 if districtW5 == 10805
replace GB15_marginW5 = 45.9361 if districtW5 == 10806
replace GB15_marginW5 = 47.73555 if districtW5 == 10807
replace GB15_marginW5 = 57.30503 if districtW5 == 10808
replace GB15_marginW5 = 29.76624 if districtW5 == 10809
replace GB15_marginW5 = 11.26226 if districtW5 == 10810
replace GB15_marginW5 = 46.23818 if districtW5 == 10811
replace GB15_marginW5 = 35.7299 if districtW5 == 10812
replace GB15_marginW5 = 40.1774 if districtW5 == 10813
replace GB15_marginW5 = 26.76361 if districtW5 == 10814
replace GB15_marginW5 = 22.64565 if districtW5 == 10815
replace GB15_marginW5 = 33.08818 if districtW5 == 10816
replace GB15_marginW5 = 42.2424 if districtW5 == 10817
replace GB15_marginW5 = 39.31451 if districtW5 == 10818
replace GB15_marginW5 = 38.14896 if districtW5 == 10819
replace GB15_marginW5 = 4.9653 if districtW5 == 10820
replace GB15_marginW5 = 16.90529 if districtW5 == 10821
replace GB15_marginW5 = 14.71102 if districtW5 == 10822
replace GB15_marginW5 = 37.48615 if districtW5 == 10823
replace GB15_marginW5 = 46.16068 if districtW5 == 10824
replace GB15_marginW5 = 10.61468 if districtW5 == 10825
replace GB15_marginW5 = .8746117 if districtW5 == 10826
replace GB15_marginW5 = 38.75261 if districtW5 == 10827
replace GB15_marginW5 = 43.45919 if districtW5 == 10828
replace GB15_marginW5 = 35.32178 if districtW5 == 10829
replace GB15_marginW5 = 46.01746 if districtW5 == 10830
replace GB15_marginW5 = 36.12085 if districtW5 == 10831
replace GB15_marginW5 = 31.85457 if districtW5 == 10832
replace GB15_marginW5 = 22.617 if districtW5 == 10833
replace GB15_marginW5 = 1.511735 if districtW5 == 10834
replace GB15_marginW5 = 23.28145 if districtW5 == 10835
replace GB15_marginW5 = 33.6144 if districtW5 == 10836
replace GB15_marginW5 = 13.7237 if districtW5 == 10837
replace GB15_marginW5 = 13.25688 if districtW5 == 10838
replace GB15_marginW5 = 39.55793 if districtW5 == 10839
replace GB15_marginW5 = 33.98595 if districtW5 == 10840
replace GB15_marginW5 = 43.70739 if districtW5 == 10841
replace GB15_marginW5 = 32.58787 if districtW5 == 10842
replace GB15_marginW5 = 3.927171 if districtW5 == 10843
replace GB15_marginW5 = 55.4 if districtW5 == 10844
replace GB15_marginW5 = 36.49091 if districtW5 == 10845
replace GB15_marginW5 = 24.94424 if districtW5 == 10846
replace GB15_marginW5 = 41.63839 if districtW5 == 10847
replace GB15_marginW5 = 8.18189 if districtW5 == 10848
replace GB15_marginW5 = 31.37352 if districtW5 == 10849
replace GB15_marginW5 = 39.18937 if districtW5 == 10850
replace GB15_marginW5 = 22.56039 if districtW5 == 10851
replace GB15_marginW5 = 23.26738 if districtW5 == 10852
replace GB15_marginW5 = 36.72519 if districtW5 == 10853
replace GB15_marginW5 = 6.275198 if districtW5 == 10854
replace GB15_marginW5 = 32.39771 if districtW5 == 10855
replace GB15_marginW5 = 23.48545 if districtW5 == 10856
replace GB15_marginW5 = 43.37893 if districtW5 == 10857
replace GB15_marginW5 = 22.06293 if districtW5 == 10858
replace GB15_marginW5 = 29.44417 if districtW5 == 10859
replace GB15_marginW5 = 41.62909 if districtW5 == 10860
replace GB15_marginW5 = 8.233741 if districtW5 == 10861
replace GB15_marginW5 = 9.754655 if districtW5 == 10862
replace GB15_marginW5 = 10.23812 if districtW5 == 10863
replace GB15_marginW5 = 15.79349 if districtW5 == 10864
replace GB15_marginW5 = 33.78114 if districtW5 == 10865
replace GB15_marginW5 = 33.55686 if districtW5 == 10866
replace GB15_marginW5 = 15.95767 if districtW5 == 10867
replace GB15_marginW5 = 10.67127 if districtW5 == 10868
replace GB15_marginW5 = 33.80465 if districtW5 == 10869
replace GB15_marginW5 = 13.49279 if districtW5 == 10870
replace GB15_marginW5 = 34.16556 if districtW5 == 10871
replace GB15_marginW5 = 40.74686 if districtW5 == 10872
replace GB15_marginW5 = 30.14461 if districtW5 == 10873
replace GB15_marginW5 = 16.738 if districtW5 == 10874
replace GB15_marginW5 = 12.26827 if districtW5 == 10875
replace GB15_marginW5 = 14.34883 if districtW5 == 10876
replace GB15_marginW5 = 45.29496 if districtW5 == 10877
replace GB15_marginW5 = 4.089218 if districtW5 == 10878
replace GB15_marginW5 = 2.408111 if districtW5 == 10879
replace GB15_marginW5 = 1.090425 if districtW5 == 10880
replace GB15_marginW5 = 33.31504 if districtW5 == 10881
replace GB15_marginW5 = 33.15571 if districtW5 == 10882
replace GB15_marginW5 = 23.21437 if districtW5 == 10883
replace GB15_marginW5 = 12.50746 if districtW5 == 10884
replace GB15_marginW5 = 36.05426 if districtW5 == 10885
replace GB15_marginW5 = 8.83814 if districtW5 == 10886
replace GB15_marginW5 = 23.77783 if districtW5 == 10887
replace GB15_marginW5 = 32.37505 if districtW5 == 10888
replace GB15_marginW5 = 12.91243 if districtW5 == 10889
replace GB15_marginW5 = 13.73853 if districtW5 == 10890
replace GB15_marginW5 = 25.38674 if districtW5 == 10891
replace GB15_marginW5 = 15.99619 if districtW5 == 10892
replace GB15_marginW5 = 43.49452 if districtW5 == 10893
replace GB15_marginW5 = 26.04368 if districtW5 == 10894
replace GB15_marginW5 = 36.20437 if districtW5 == 10895
replace GB15_marginW5 = 38.94181 if districtW5 == 10896
replace GB15_marginW5 = 27.38719 if districtW5 == 10897
replace GB15_marginW5 = 13.58253 if districtW5 == 10898
replace GB15_marginW5 = 21.72996 if districtW5 == 10899
replace GB15_marginW5 = 28.1813 if districtW5 == 10900
replace GB15_marginW5 = 36.59655 if districtW5 == 10901
replace GB15_marginW5 = 11.53313 if districtW5 == 10902
replace GB15_marginW5 = 15.51926 if districtW5 == 10903
replace GB15_marginW5 = 22.33033 if districtW5 == 10904
replace GB15_marginW5 = 21.10966 if districtW5 == 10905
replace GB15_marginW5 = 39.48304 if districtW5 == 10906
replace GB15_marginW5 = 44.22201 if districtW5 == 10907
replace GB15_marginW5 = 25.06889 if districtW5 == 10908
replace GB15_marginW5 = 39.75056 if districtW5 == 10909
replace GB15_marginW5 = 43.41504 if districtW5 == 10910
replace GB15_marginW5 = 28.98916 if districtW5 == 10911
replace GB15_marginW5 = 40.27414 if districtW5 == 10912
replace GB15_marginW5 = 12.98729 if districtW5 == 10913
replace GB15_marginW5 = 8.483797 if districtW5 == 10914
replace GB15_marginW5 = 17.67486 if districtW5 == 10915
replace GB15_marginW5 = 24.16516 if districtW5 == 10916
replace GB15_marginW5 = 25.67419 if districtW5 == 10917
replace GB15_marginW5 = 39.02522 if districtW5 == 10918
replace GB15_marginW5 = 39.18457 if districtW5 == 10919
replace GB15_marginW5 = 29.53341 if districtW5 == 10920
replace GB15_marginW5 = 34.47182 if districtW5 == 10921
replace GB15_marginW5 = 4.241091 if districtW5 == 10922
replace GB15_marginW5 = 30.80765 if districtW5 == 10923
replace GB15_marginW5 = 9.166041 if districtW5 == 10924
replace GB15_marginW5 = 19.04159 if districtW5 == 10925
replace GB15_marginW5 = 17.67957 if districtW5 == 10926
replace GB15_marginW5 = 24.64255 if districtW5 == 10927
replace GB15_marginW5 = 38.05238 if districtW5 == 10928
replace GB15_marginW5 = 38.93032 if districtW5 == 10929
replace GB15_marginW5 = 15.19627 if districtW5 == 10930
replace GB15_marginW5 = 23.55282 if districtW5 == 10931
replace GB15_marginW5 = 33.60693 if districtW5 == 10932
replace GB15_marginW5 = 16.86882 if districtW5 == 10933
replace GB15_marginW5 = 33.46441 if districtW5 == 10934
replace GB15_marginW5 = 22.59761 if districtW5 == 10935
replace GB15_marginW5 = 24.68054 if districtW5 == 10936
replace GB15_marginW5 = 28.29463 if districtW5 == 10937
replace GB15_marginW5 = 33.6548 if districtW5 == 10938
replace GB15_marginW5 = 37.73244 if districtW5 == 10939
replace GB15_marginW5 = 31.19831 if districtW5 == 10940
replace GB15_marginW5 = 35.87522 if districtW5 == 10941
replace GB15_marginW5 = 43.40311 if districtW5 == 10942
replace GB15_marginW5 = 11.35192 if districtW5 == 10943
replace GB15_marginW5 = 29.26789 if districtW5 == 10944
replace GB15_marginW5 = 41.07222 if districtW5 == 10945
replace GB15_marginW5 = 33.80084 if districtW5 == 10946
replace GB15_marginW5 = 11.74309 if districtW5 == 10947
replace GB15_marginW5 = 5.692193 if districtW5 == 10948
replace GB15_marginW5 = 34.72049 if districtW5 == 10949
replace GB15_marginW5 = 39.92099 if districtW5 == 10950
replace GB15_marginW5 = 40.622 if districtW5 == 10951
replace GB15_marginW5 = 27.66115 if districtW5 == 10952
replace GB15_marginW5 = 49.99387 if districtW5 == 10953
replace GB15_marginW5 = 35.17998 if districtW5 == 10954
replace GB15_marginW5 = 5.180052 if districtW5 == 10955
replace GB15_marginW5 = 8.728123 if districtW5 == 10956
replace GB15_marginW5 = 31.5015 if districtW5 == 10957
replace GB15_marginW5 = 2.997663 if districtW5 == 10958
replace GB15_marginW5 = 28.83514 if districtW5 == 10959
replace GB15_marginW5 = 23.39022 if districtW5 == 10960
replace GB15_marginW5 = 16.22883 if districtW5 == 10961
replace GB15_marginW5 = 37.3811 if districtW5 == 10962
replace GB15_marginW5 = 43.89322 if districtW5 == 10963
replace GB15_marginW5 = 5.110532 if districtW5 == 10964
replace GB15_marginW5 = 18.81805 if districtW5 == 10965
replace GB15_marginW5 = 23.88992 if districtW5 == 10966
replace GB15_marginW5 = 16.29381 if districtW5 == 10967
replace GB15_marginW5 = 10.36632 if districtW5 == 10968
replace GB15_marginW5 = 25.37517 if districtW5 == 10969
replace GB15_marginW5 = 21.14427 if districtW5 == 10970
replace GB15_marginW5 = 9.741879 if districtW5 == 10971
replace GB15_marginW5 = 16.66131 if districtW5 == 10972
replace GB15_marginW5 = 12.511 if districtW5 == 10973
replace GB15_marginW5 = 6.492442 if districtW5 == 10974
replace GB15_marginW5 = 34.55168 if districtW5 == 10975
replace GB15_marginW5 = 14.54301 if districtW5 == 10976
replace GB15_marginW5 = 44.45481 if districtW5 == 10977
replace GB15_marginW5 = 27.9054 if districtW5 == 10978
replace GB15_marginW5 = 25.19079 if districtW5 == 10979
replace GB15_marginW5 = 8.000792 if districtW5 == 10980
replace GB15_marginW5 = 33.89214 if districtW5 == 10981
replace GB15_marginW5 = 26.76835 if districtW5 == 10982
replace GB15_marginW5 = 45.56962 if districtW5 == 10983
replace GB15_marginW5 = 7.856929 if districtW5 == 10984
replace GB15_marginW5 = 32.28262 if districtW5 == 10985
replace GB15_marginW5 = 23.95811 if districtW5 == 10986
replace GB15_marginW5 = 40.26889 if districtW5 == 10987
replace GB15_marginW5 = 26.76076 if districtW5 == 10988
replace GB15_marginW5 = 1.79604 if districtW5 == 10989
replace GB15_marginW5 = 39.70078 if districtW5 == 10990
replace GB15_marginW5 = 37.90037 if districtW5 == 10991
replace GB15_marginW5 = 23.64373 if districtW5 == 10992
replace GB15_marginW5 = 37.15459 if districtW5 == 10993
replace GB15_marginW5 = 3.078032 if districtW5 == 10994
replace GB15_marginW5 = 1.081431 if districtW5 == 10995
replace GB15_marginW5 = 37.52209 if districtW5 == 10996
replace GB15_marginW5 = 44.2221 if districtW5 == 10997
replace GB15_marginW5 = 5.309272 if districtW5 == 10998
replace GB15_marginW5 = 6.834584 if districtW5 == 10999
replace GB15_marginW5 = 32.52333 if districtW5 == 11000
replace GB15_marginW5 = 38.82413 if districtW5 == 11001
replace GB15_marginW5 = 55.36914 if districtW5 == 11002
replace GB15_marginW5 = 27.16126 if districtW5 == 11003
replace GB15_marginW5 = 44.47771 if districtW5 == 11004
replace GB15_marginW5 = 3.253016 if districtW5 == 11005
replace GB15_marginW5 = 15.40331 if districtW5 == 11006
replace GB15_marginW5 = 23.86691 if districtW5 == 11007
replace GB15_marginW5 = 26.50759 if districtW5 == 11008
replace GB15_marginW5 = 6.080562 if districtW5 == 11009
replace GB15_marginW5 = 37.69774 if districtW5 == 11010
replace GB15_marginW5 = 5.251741 if districtW5 == 11011
replace GB15_marginW5 = 14.35776 if districtW5 == 11012
replace GB15_marginW5 = 55.49574 if districtW5 == 11013
replace GB15_marginW5 = 28.24179 if districtW5 == 11014
replace GB15_marginW5 = 37.29252 if districtW5 == 11015
replace GB15_marginW5 = 38.86436 if districtW5 == 11016
replace GB15_marginW5 = 19.64596 if districtW5 == 11017
replace GB15_marginW5 = 4.633296 if districtW5 == 11018
replace GB15_marginW5 = 13.06024 if districtW5 == 11019
replace GB15_marginW5 = 35.31417 if districtW5 == 11020
replace GB15_marginW5 = 17.44288 if districtW5 == 11021
replace GB15_marginW5 = 4.613379 if districtW5 == 11022
replace GB15_marginW5 = 40.28097 if districtW5 == 11023
replace GB15_marginW5 = 1.719761 if districtW5 == 11024
replace GB15_marginW5 = 32.51437 if districtW5 == 11025
replace GB15_marginW5 = 13.32947 if districtW5 == 11026
replace GB15_marginW5 = 24.20675 if districtW5 == 11027
replace GB15_marginW5 = 32.04056 if districtW5 == 11028
replace GB15_marginW5 = 25.25872 if districtW5 == 11029
replace GB15_marginW5 = 22.10358 if districtW5 == 11030
replace GB15_marginW5 = 28.56991 if districtW5 == 11031
replace GB15_marginW5 = 53.01081 if districtW5 == 11032
replace GB15_marginW5 = 16.82905 if districtW5 == 11033
replace GB15_marginW5 = 30.43549 if districtW5 == 11034
replace GB15_marginW5 = 41.73383 if districtW5 == 11035
replace GB15_marginW5 = 5.003291 if districtW5 == 11036
replace GB15_marginW5 = 18.28977 if districtW5 == 11037
replace GB15_marginW5 = 29.70201 if districtW5 == 11038
replace GB15_marginW5 = 31.4309 if districtW5 == 11039
replace GB15_marginW5 = 26.06047 if districtW5 == 11040
replace GB15_marginW5 = 30.57705 if districtW5 == 11041
replace GB15_marginW5 = 50.00598 if districtW5 == 11042
replace GB15_marginW5 = 10.99266 if districtW5 == 11043
replace GB15_marginW5 = .9962261 if districtW5 == 11044
replace GB15_marginW5 = 41.45607 if districtW5 == 11045
replace GB15_marginW5 = 43.01324 if districtW5 == 11046
replace GB15_marginW5 = 40.04696 if districtW5 == 11047
replace GB15_marginW5 = 43.2097 if districtW5 == 11048
replace GB15_marginW5 = 16.16034 if districtW5 == 11049
replace GB15_marginW5 = 31.00334 if districtW5 == 11050
replace GB15_marginW5 = 1.992092 if districtW5 == 11051
replace GB15_marginW5 = 11.35491 if districtW5 == 11052
replace GB15_marginW5 = 12.18314 if districtW5 == 11053
replace GB15_marginW5 = 14.14098 if districtW5 == 11054
replace GB15_marginW5 = 33.20332 if districtW5 == 11055
replace GB15_marginW5 = 28.88081 if districtW5 == 11056
replace GB15_marginW5 = 28.36269 if districtW5 == 11057
replace GB15_marginW5 = 26.03358 if districtW5 == 11058
replace GB15_marginW5 = 24.42965 if districtW5 == 11059
replace GB15_marginW5 = 9.332022 if districtW5 == 11060
replace GB15_marginW5 = 14.08646 if districtW5 == 11061
replace GB15_marginW5 = 24.35671 if districtW5 == 11062
replace GB15_marginW5 = 6.54453 if districtW5 == 40001
replace GB15_marginW5 = 13.12049 if districtW5 == 40002
replace GB15_marginW5 = 2.325641 if districtW5 == 40003
replace GB15_marginW5 = 34.99957 if districtW5 == 40004
replace GB15_marginW5 = 17.30006 if districtW5 == 40005
replace GB15_marginW5 = 22.48084 if districtW5 == 40006
replace GB15_marginW5 = 1.041993 if districtW5 == 40007
replace GB15_marginW5 = 16.33966 if districtW5 == 40008
replace GB15_marginW5 = 32.66742 if districtW5 == 40009
replace GB15_marginW5 = 33.2755 if districtW5 == 40010
replace GB15_marginW5 = 8.372599 if districtW5 == 40011
replace GB15_marginW5 = 27.55148 if districtW5 == 40012
replace GB15_marginW5 = 25.5988 if districtW5 == 40013
replace GB15_marginW5 = 2.598363 if districtW5 == 40014
replace GB15_marginW5 = 13.79722 if districtW5 == 40015
replace GB15_marginW5 = 30.02299 if districtW5 == 40016
replace GB15_marginW5 = 4.794681 if districtW5 == 40017
replace GB15_marginW5 = 26.02577 if districtW5 == 40018
replace GB15_marginW5 = 30.48981 if districtW5 == 20001
replace GB15_marginW5 = 14.89156 if districtW5 == 20002
replace GB15_marginW5 = 19.82342 if districtW5 == 20003
replace GB15_marginW5 = 25.24446 if districtW5 == 20004
replace GB15_marginW5 = 16.33097 if districtW5 == 20005
replace GB15_marginW5 = 21.57674 if districtW5 == 20006
replace GB15_marginW5 = 31.42519 if districtW5 == 20007
replace GB15_marginW5 = .5959511 if districtW5 == 20008
replace GB15_marginW5 = 11.24437 if districtW5 == 20009
replace GB15_marginW5 = 26.7637 if districtW5 == 20010
replace GB15_marginW5 = 22.68532 if districtW5 == 20011
replace GB15_marginW5 = 29.87323 if districtW5 == 20012
replace GB15_marginW5 = 11.50843 if districtW5 == 20013
replace GB15_marginW5 = 1.530668 if districtW5 == 20014
replace GB15_marginW5 = 39.76756 if districtW5 == 20015
replace GB15_marginW5 = 38.22517 if districtW5 == 20016
replace GB15_marginW5 = 18.5221 if districtW5 == 20017
replace GB15_marginW5 = 3.949264 if districtW5 == 20018
replace GB15_marginW5 = 27.29976 if districtW5 == 20019
replace GB15_marginW5 = 11.52777 if districtW5 == 20020
replace GB15_marginW5 = 6.553853 if districtW5 == 20021
replace GB15_marginW5 = 19.33785 if districtW5 == 20022
replace GB15_marginW5 = 9.648668 if districtW5 == 20023
replace GB15_marginW5 = 5.350402 if districtW5 == 20024
replace GB15_marginW5 = 15.76489 if districtW5 == 20025
replace GB15_marginW5 = 5.851471 if districtW5 == 20026
replace GB15_marginW5 = 25.73723 if districtW5 == 20027
replace GB15_marginW5 = 32.64998 if districtW5 == 20028
replace GB15_marginW5 = 19.48726 if districtW5 == 20029
replace GB15_marginW5 = 24.48782 if districtW5 == 20030
replace GB15_marginW5 = 25.17469 if districtW5 == 20031
replace GB15_marginW5 = 24.36009 if districtW5 == 20032
replace GB15_marginW5 = 23.63297 if districtW5 == 20033
replace GB15_marginW5 = 25.15273 if districtW5 == 20034
replace GB15_marginW5 = 24.31515 if districtW5 == 20035
replace GB15_marginW5 = 29.1966 if districtW5 == 20036
replace GB15_marginW5 = 14.93612 if districtW5 == 20037
replace GB15_marginW5 = 24.80104 if districtW5 == 20038
replace GB15_marginW5 = 18.76139 if districtW5 == 20039
replace GB15_marginW5 = 25.301 if districtW5 == 20040
replace GB15_marginW5 = 18.8573 if districtW5 == 20041
replace GB15_marginW5 = 18.27789 if districtW5 == 20042
replace GB15_marginW5 = 20.99778 if districtW5 == 20043
replace GB15_marginW5 = 29.26825 if districtW5 == 20044
replace GB15_marginW5 = 20.39891 if districtW5 == 20045
replace GB15_marginW5 = 18.39488 if districtW5 == 20046
replace GB15_marginW5 = 24.66571 if districtW5 == 20047
replace GB15_marginW5 = 25.19631 if districtW5 == 20048
replace GB15_marginW5 = 9.597242 if districtW5 == 20049
replace GB15_marginW5 = 17.57011 if districtW5 == 20050
replace GB15_marginW5 = 3.594685 if districtW5 == 20051
replace GB15_marginW5 = 17.98581 if districtW5 == 20052
replace GB15_marginW5 = 12.29611 if districtW5 == 20053
replace GB15_marginW5 = 17.78782 if districtW5 == 20054
replace GB15_marginW5 = 12.25515 if districtW5 == 20055
replace GB15_marginW5 = 17.3132 if districtW5 == 20056
replace GB15_marginW5 = 20.10166 if districtW5 == 20057
replace GB15_marginW5 = 12.74187 if districtW5 == 20058
replace GB15_marginW5 = 27.70967 if districtW5 == 20059
replace GB15_marginW5 = .655672 if districtW5 == 30041
replace GB15_marginW5 = 7.822305 if districtW5 == 30042
replace GB15_marginW5 = 8.091688 if districtW5 == 30043
replace GB15_marginW5 = 5.596137 if districtW5 == 30044
replace GB15_marginW5 = 18.39322 if districtW5 == 30045
replace GB15_marginW5 = .0631452 if districtW5 == 30046
replace GB15_marginW5 = 20.01365 if districtW5 == 30047
replace GB15_marginW5 = 35.77845 if districtW5 == 30048
replace GB15_marginW5 = 33.13454 if districtW5 == 30049
replace GB15_marginW5 = 12.88878 if districtW5 == 30050
replace GB15_marginW5 = 4.177827 if districtW5 == 30051
replace GB15_marginW5 = 23.63815 if districtW5 == 30052
replace GB15_marginW5 = 21.53307 if districtW5 == 30053
replace GB15_marginW5 = 23.13851 if districtW5 == 30054
replace GB15_marginW5 = 13.40151 if districtW5 == 30055
replace GB15_marginW5 = 8.699531 if districtW5 == 30056
replace GB15_marginW5 = 13.6677 if districtW5 == 30057
replace GB15_marginW5 = 13.26456 if districtW5 == 30058
replace GB15_marginW5 = 17.69749 if districtW5 == 30059
replace GB15_marginW5 = .6721318 if districtW5 == 30060
replace GB15_marginW5 = 18.19597 if districtW5 == 30061
replace GB15_marginW5 = 6.850332 if districtW5 == 30062
replace GB15_marginW5 = 15.77451 if districtW5 == 30063
replace GB15_marginW5 = 8.197027 if districtW5 == 30064
replace GB15_marginW5 = 12.25219 if districtW5 == 30065
replace GB15_marginW5 = 15.00372 if districtW5 == 30066
replace GB15_marginW5 = 14.21102 if districtW5 == 30067
replace GB15_marginW5 = 12.73145 if districtW5 == 30068
replace GB15_marginW5 = 25.71159 if districtW5 == 30069
replace GB15_marginW5 = 30.86768 if districtW5 == 30070
replace GB15_marginW5 = 35.19181 if districtW5 == 30071
replace GB15_marginW5 = 40.09406 if districtW5 == 30072
replace GB15_marginW5 = 4.884291 if districtW5 == 30073
replace GB15_marginW5 = 37.00142 if districtW5 == 30074
replace GB15_marginW5 = 23.71839 if districtW5 == 30075
replace GB15_marginW5 = 25.00558 if districtW5 == 30076
replace GB15_marginW5 = 29.389 if districtW5 == 30077
replace GB15_marginW5 = 13.41314 if districtW5 == 30078
replace GB15_marginW5 = 15.50283 if districtW5 == 30079
replace GB15_marginW5 = 15.9706 if districtW5 == 30080

* Effective number of electoral parties

gen GB15_enepW4 = .

replace GB15_enepW4 = 3.019356 if districtW4 == 10530
replace GB15_enepW4 = 2.769631 if districtW4 == 10531
replace GB15_enepW4 = 2.724512 if districtW4 == 10532
replace GB15_enepW4 = 2.931851 if districtW4 == 10533
replace GB15_enepW4 = 2.426326 if districtW4 == 10534
replace GB15_enepW4 = 3.492003 if districtW4 == 10535
replace GB15_enepW4 = 2.857112 if districtW4 == 10536
replace GB15_enepW4 = 2.889848 if districtW4 == 10537
replace GB15_enepW4 = 3.018114 if districtW4 == 10538
replace GB15_enepW4 = 2.845595 if districtW4 == 10539
replace GB15_enepW4 = 2.443873 if districtW4 == 10540
replace GB15_enepW4 = 2.619029 if districtW4 == 10541
replace GB15_enepW4 = 2.64931 if districtW4 == 10542
replace GB15_enepW4 = 2.791105 if districtW4 == 10543
replace GB15_enepW4 = 2.670943 if districtW4 == 10544
replace GB15_enepW4 = 2.920615 if districtW4 == 10545
replace GB15_enepW4 = 2.800022 if districtW4 == 10546
replace GB15_enepW4 = 3.75046 if districtW4 == 10547
replace GB15_enepW4 = 3.127466 if districtW4 == 10548
replace GB15_enepW4 = 2.415739 if districtW4 == 10549
replace GB15_enepW4 = 2.277258 if districtW4 == 10550
replace GB15_enepW4 = 2.578543 if districtW4 == 10551
replace GB15_enepW4 = 2.817124 if districtW4 == 10552
replace GB15_enepW4 = 3.098189 if districtW4 == 10553
replace GB15_enepW4 = 3.466405 if districtW4 == 10554
replace GB15_enepW4 = 2.424269 if districtW4 == 10555
replace GB15_enepW4 = 3.063132 if districtW4 == 10556
replace GB15_enepW4 = 2.760567 if districtW4 == 10557
replace GB15_enepW4 = 2.962383 if districtW4 == 10558
replace GB15_enepW4 = 2.032964 if districtW4 == 10559
replace GB15_enepW4 = 2.779283 if districtW4 == 10560
replace GB15_enepW4 = 2.984036 if districtW4 == 10561
replace GB15_enepW4 = 2.455388 if districtW4 == 10562
replace GB15_enepW4 = 2.006761 if districtW4 == 10563
replace GB15_enepW4 = 1.772724 if districtW4 == 10564
replace GB15_enepW4 = 3.025247 if districtW4 == 10565
replace GB15_enepW4 = 2.535539 if districtW4 == 10566
replace GB15_enepW4 = 3.00285 if districtW4 == 10567
replace GB15_enepW4 = 3.512263 if districtW4 == 10568
replace GB15_enepW4 = 3.203588 if districtW4 == 10569
replace GB15_enepW4 = 2.427308 if districtW4 == 10570
replace GB15_enepW4 = 2.296087 if districtW4 == 10571
replace GB15_enepW4 = 2.85857 if districtW4 == 10572
replace GB15_enepW4 = 3.122542 if districtW4 == 10573
replace GB15_enepW4 = 3.134684 if districtW4 == 10574
replace GB15_enepW4 = 3.161563 if districtW4 == 10575
replace GB15_enepW4 = 2.944597 if districtW4 == 10576
replace GB15_enepW4 = 2.721511 if districtW4 == 10577
replace GB15_enepW4 = 3.038856 if districtW4 == 10578
replace GB15_enepW4 = 2.830414 if districtW4 == 10579
replace GB15_enepW4 = 2.923068 if districtW4 == 10580
replace GB15_enepW4 = 1.74085 if districtW4 == 10581
replace GB15_enepW4 = 2.992774 if districtW4 == 10582
replace GB15_enepW4 = 3.402826 if districtW4 == 10583
replace GB15_enepW4 = 3.228405 if districtW4 == 10584
replace GB15_enepW4 = 3.224344 if districtW4 == 10585
replace GB15_enepW4 = 2.691676 if districtW4 == 10586
replace GB15_enepW4 = 3.050441 if districtW4 == 10587
replace GB15_enepW4 = 3.149039 if districtW4 == 10588
replace GB15_enepW4 = 3.10569 if districtW4 == 10589
replace GB15_enepW4 = 2.755727 if districtW4 == 10590
replace GB15_enepW4 = 2.28564 if districtW4 == 10591
replace GB15_enepW4 = 2.427649 if districtW4 == 10592
replace GB15_enepW4 = 2.617934 if districtW4 == 10593
replace GB15_enepW4 = 2.508872 if districtW4 == 10594
replace GB15_enepW4 = 3.370277 if districtW4 == 10595
replace GB15_enepW4 = 2.632189 if districtW4 == 10596
replace GB15_enepW4 = 2.992068 if districtW4 == 10597
replace GB15_enepW4 = 3.285373 if districtW4 == 10598
replace GB15_enepW4 = 3.54074 if districtW4 == 10599
replace GB15_enepW4 = 3.053307 if districtW4 == 10600
replace GB15_enepW4 = 3.929509 if districtW4 == 10601
replace GB15_enepW4 = 3.866528 if districtW4 == 10602
replace GB15_enepW4 = 3.034416 if districtW4 == 10603
replace GB15_enepW4 = 2.808555 if districtW4 == 10604
replace GB15_enepW4 = 2.7225 if districtW4 == 10605
replace GB15_enepW4 = 2.573158 if districtW4 == 10606
replace GB15_enepW4 = 2.805386 if districtW4 == 10607
replace GB15_enepW4 = 2.074871 if districtW4 == 10608
replace GB15_enepW4 = 3.61247 if districtW4 == 10609
replace GB15_enepW4 = 2.808543 if districtW4 == 10610
replace GB15_enepW4 = 2.76828 if districtW4 == 10611
replace GB15_enepW4 = 2.916198 if districtW4 == 10612
replace GB15_enepW4 = 2.853732 if districtW4 == 10613
replace GB15_enepW4 = 3.015301 if districtW4 == 10614
replace GB15_enepW4 = 2.311352 if districtW4 == 10615
replace GB15_enepW4 = 3.774472 if districtW4 == 10616
replace GB15_enepW4 = 3.511832 if districtW4 == 10617
replace GB15_enepW4 = 2.935856 if districtW4 == 10618
replace GB15_enepW4 = 3.558304 if districtW4 == 10619
replace GB15_enepW4 = 2.808913 if districtW4 == 10620
replace GB15_enepW4 = 3.737658 if districtW4 == 10621
replace GB15_enepW4 = 2.660426 if districtW4 == 10622
replace GB15_enepW4 = 3.03516 if districtW4 == 10623
replace GB15_enepW4 = 2.668502 if districtW4 == 10624
replace GB15_enepW4 = 2.679112 if districtW4 == 10625
replace GB15_enepW4 = 2.867078 if districtW4 == 10626
replace GB15_enepW4 = 3.170948 if districtW4 == 10627
replace GB15_enepW4 = 3.009329 if districtW4 == 10628
replace GB15_enepW4 = 2.191413 if districtW4 == 10629
replace GB15_enepW4 = 2.929892 if districtW4 == 10630
replace GB15_enepW4 = 2.53273 if districtW4 == 10631
replace GB15_enepW4 = 3.231987 if districtW4 == 10632
replace GB15_enepW4 = 2.623266 if districtW4 == 10633
replace GB15_enepW4 = 2.992692 if districtW4 == 10634
replace GB15_enepW4 = 3.00868 if districtW4 == 10635
replace GB15_enepW4 = 2.754156 if districtW4 == 10636
replace GB15_enepW4 = 2.817628 if districtW4 == 10637
replace GB15_enepW4 = 2.506024 if districtW4 == 10638
replace GB15_enepW4 = 2.646348 if districtW4 == 10639
replace GB15_enepW4 = 2.618104 if districtW4 == 10640
replace GB15_enepW4 = 3.304492 if districtW4 == 10641
replace GB15_enepW4 = 2.828275 if districtW4 == 10642
replace GB15_enepW4 = 2.958084 if districtW4 == 10643
replace GB15_enepW4 = 3.698987 if districtW4 == 10644
replace GB15_enepW4 = 2.985609 if districtW4 == 10645
replace GB15_enepW4 = 2.828629 if districtW4 == 10646
replace GB15_enepW4 = 3.003869 if districtW4 == 10647
replace GB15_enepW4 = 2.849055 if districtW4 == 10648
replace GB15_enepW4 = 2.850522 if districtW4 == 10649
replace GB15_enepW4 = 3.398499 if districtW4 == 10650
replace GB15_enepW4 = 3.110316 if districtW4 == 10651
replace GB15_enepW4 = 2.810557 if districtW4 == 10652
replace GB15_enepW4 = 2.727928 if districtW4 == 10653
replace GB15_enepW4 = 2.65786 if districtW4 == 10654
replace GB15_enepW4 = 2.221941 if districtW4 == 10655
replace GB15_enepW4 = 2.670741 if districtW4 == 10656
replace GB15_enepW4 = 3.118343 if districtW4 == 10657
replace GB15_enepW4 = 3.045423 if districtW4 == 10658
replace GB15_enepW4 = 2.89444 if districtW4 == 10659
replace GB15_enepW4 = 2.504936 if districtW4 == 10660
replace GB15_enepW4 = 2.846731 if districtW4 == 10661
replace GB15_enepW4 = 3.355442 if districtW4 == 10662
replace GB15_enepW4 = 2.923609 if districtW4 == 10663
replace GB15_enepW4 = 2.86877 if districtW4 == 10664
replace GB15_enepW4 = 2.605488 if districtW4 == 10665
replace GB15_enepW4 = 2.902349 if districtW4 == 10666
replace GB15_enepW4 = 2.998601 if districtW4 == 10667
replace GB15_enepW4 = 2.906168 if districtW4 == 10668
replace GB15_enepW4 = 2.772675 if districtW4 == 10669
replace GB15_enepW4 = 3.081032 if districtW4 == 10670
replace GB15_enepW4 = 3.052195 if districtW4 == 10671
replace GB15_enepW4 = 2.987391 if districtW4 == 10672
replace GB15_enepW4 = 2.751746 if districtW4 == 10673
replace GB15_enepW4 = 2.66217 if districtW4 == 10674
replace GB15_enepW4 = 2.493388 if districtW4 == 10675
replace GB15_enepW4 = 2.108326 if districtW4 == 10676
replace GB15_enepW4 = 2.347605 if districtW4 == 10677
replace GB15_enepW4 = 3.289593 if districtW4 == 10678
replace GB15_enepW4 = 1.613408 if districtW4 == 10679
replace GB15_enepW4 = 2.446707 if districtW4 == 10680
replace GB15_enepW4 = 2.613276 if districtW4 == 10681
replace GB15_enepW4 = 3.143018 if districtW4 == 10682
replace GB15_enepW4 = 2.980947 if districtW4 == 10683
replace GB15_enepW4 = 3.099804 if districtW4 == 10684
replace GB15_enepW4 = 3.474996 if districtW4 == 10685
replace GB15_enepW4 = 2.935463 if districtW4 == 10686
replace GB15_enepW4 = 2.254275 if districtW4 == 10687
replace GB15_enepW4 = 2.763564 if districtW4 == 10688
replace GB15_enepW4 = 2.755147 if districtW4 == 10689
replace GB15_enepW4 = 2.955771 if districtW4 == 10690
replace GB15_enepW4 = 2.690508 if districtW4 == 10691
replace GB15_enepW4 = 2.496044 if districtW4 == 10692
replace GB15_enepW4 = 2.733729 if districtW4 == 10693
replace GB15_enepW4 = 2.573889 if districtW4 == 10694
replace GB15_enepW4 = 2.987936 if districtW4 == 10695
replace GB15_enepW4 = 2.82654 if districtW4 == 10696
replace GB15_enepW4 = 2.314546 if districtW4 == 10697
replace GB15_enepW4 = 2.944063 if districtW4 == 10698
replace GB15_enepW4 = 2.715412 if districtW4 == 10699
replace GB15_enepW4 = 2.778743 if districtW4 == 10700
replace GB15_enepW4 = 2.659511 if districtW4 == 10701
replace GB15_enepW4 = 3.142867 if districtW4 == 10702
replace GB15_enepW4 = 2.381215 if districtW4 == 10703
replace GB15_enepW4 = 3.200631 if districtW4 == 10704
replace GB15_enepW4 = 3.150823 if districtW4 == 10705
replace GB15_enepW4 = 3.229531 if districtW4 == 10706
replace GB15_enepW4 = 2.8347 if districtW4 == 10707
replace GB15_enepW4 = 1.969877 if districtW4 == 10708
replace GB15_enepW4 = 2.620913 if districtW4 == 10709
replace GB15_enepW4 = 3.006004 if districtW4 == 10710
replace GB15_enepW4 = 2.976339 if districtW4 == 10711
replace GB15_enepW4 = 3.038272 if districtW4 == 10712
replace GB15_enepW4 = 2.696071 if districtW4 == 10713
replace GB15_enepW4 = 2.909893 if districtW4 == 10714
replace GB15_enepW4 = 2.892786 if districtW4 == 10715
replace GB15_enepW4 = 3.415253 if districtW4 == 10716
replace GB15_enepW4 = 3.09359 if districtW4 == 10717
replace GB15_enepW4 = 2.796212 if districtW4 == 10718
replace GB15_enepW4 = 2.671487 if districtW4 == 10719
replace GB15_enepW4 = 2.267147 if districtW4 == 10720
replace GB15_enepW4 = 2.222984 if districtW4 == 10721
replace GB15_enepW4 = 2.8905 if districtW4 == 10722
replace GB15_enepW4 = 3.019511 if districtW4 == 10723
replace GB15_enepW4 = 2.761207 if districtW4 == 10724
replace GB15_enepW4 = 2.23499 if districtW4 == 10725
replace GB15_enepW4 = 2.573292 if districtW4 == 10726
replace GB15_enepW4 = 2.614538 if districtW4 == 10727
replace GB15_enepW4 = 2.923684 if districtW4 == 10728
replace GB15_enepW4 = 2.807575 if districtW4 == 10729
replace GB15_enepW4 = 2.853377 if districtW4 == 10730
replace GB15_enepW4 = 2.371981 if districtW4 == 10731
replace GB15_enepW4 = 2.483485 if districtW4 == 10732
replace GB15_enepW4 = 3.895663 if districtW4 == 10733
replace GB15_enepW4 = 2.964417 if districtW4 == 10734
replace GB15_enepW4 = 2.923414 if districtW4 == 10735
replace GB15_enepW4 = 2.925459 if districtW4 == 10736
replace GB15_enepW4 = 2.319618 if districtW4 == 10737
replace GB15_enepW4 = 3.492272 if districtW4 == 10738
replace GB15_enepW4 = 2.768628 if districtW4 == 10739
replace GB15_enepW4 = 2.791343 if districtW4 == 10740
replace GB15_enepW4 = 2.4023 if districtW4 == 10741
replace GB15_enepW4 = 2.586136 if districtW4 == 10742
replace GB15_enepW4 = 2.963099 if districtW4 == 10743
replace GB15_enepW4 = 2.677219 if districtW4 == 10744
replace GB15_enepW4 = 2.374853 if districtW4 == 10745
replace GB15_enepW4 = 2.798527 if districtW4 == 10746
replace GB15_enepW4 = 3.05248 if districtW4 == 10747
replace GB15_enepW4 = 2.910922 if districtW4 == 10748
replace GB15_enepW4 = 2.607893 if districtW4 == 10749
replace GB15_enepW4 = 2.849552 if districtW4 == 10750
replace GB15_enepW4 = 2.89286 if districtW4 == 10751
replace GB15_enepW4 = 2.687326 if districtW4 == 10752
replace GB15_enepW4 = 2.656974 if districtW4 == 10753
replace GB15_enepW4 = 2.594094 if districtW4 == 10754
replace GB15_enepW4 = 2.872295 if districtW4 == 10755
replace GB15_enepW4 = 3.295562 if districtW4 == 10756
replace GB15_enepW4 = 2.848907 if districtW4 == 10757
replace GB15_enepW4 = 3.067704 if districtW4 == 10758
replace GB15_enepW4 = 2.60912 if districtW4 == 10759
replace GB15_enepW4 = 2.079338 if districtW4 == 10760
replace GB15_enepW4 = 2.827201 if districtW4 == 10761
replace GB15_enepW4 = 3.966754 if districtW4 == 10762
replace GB15_enepW4 = 2.432467 if districtW4 == 10763
replace GB15_enepW4 = 3.008915 if districtW4 == 10764
replace GB15_enepW4 = 2.632408 if districtW4 == 10765
replace GB15_enepW4 = 2.804272 if districtW4 == 10766
replace GB15_enepW4 = 2.574673 if districtW4 == 10767
replace GB15_enepW4 = 2.647651 if districtW4 == 10768
replace GB15_enepW4 = 2.778704 if districtW4 == 10769
replace GB15_enepW4 = 3.328093 if districtW4 == 10770
replace GB15_enepW4 = 2.875104 if districtW4 == 10771
replace GB15_enepW4 = 2.944402 if districtW4 == 10772
replace GB15_enepW4 = 3.097446 if districtW4 == 10773
replace GB15_enepW4 = 2.895979 if districtW4 == 10774
replace GB15_enepW4 = 1.598065 if districtW4 == 10775
replace GB15_enepW4 = 2.89215 if districtW4 == 10776
replace GB15_enepW4 = 2.746339 if districtW4 == 10777
replace GB15_enepW4 = 2.696688 if districtW4 == 10778
replace GB15_enepW4 = 2.862387 if districtW4 == 10779
replace GB15_enepW4 = 3.70042 if districtW4 == 10780
replace GB15_enepW4 = 3.185162 if districtW4 == 10781
replace GB15_enepW4 = 2.292944 if districtW4 == 10782
replace GB15_enepW4 = 2.417135 if districtW4 == 10783
replace GB15_enepW4 = 3.159471 if districtW4 == 10784
replace GB15_enepW4 = 2.62274 if districtW4 == 10785
replace GB15_enepW4 = 3.363049 if districtW4 == 10786
replace GB15_enepW4 = 2.66832 if districtW4 == 10787
replace GB15_enepW4 = 2.996799 if districtW4 == 10788
replace GB15_enepW4 = 2.465597 if districtW4 == 10789
replace GB15_enepW4 = 2.477428 if districtW4 == 10790
replace GB15_enepW4 = 2.685093 if districtW4 == 10791
replace GB15_enepW4 = 2.816371 if districtW4 == 10792
replace GB15_enepW4 = 2.069739 if districtW4 == 10793
replace GB15_enepW4 = 1.487202 if districtW4 == 10794
replace GB15_enepW4 = 1.985524 if districtW4 == 10795
replace GB15_enepW4 = 1.723602 if districtW4 == 10796
replace GB15_enepW4 = 2.76407 if districtW4 == 10797
replace GB15_enepW4 = 2.912765 if districtW4 == 10798
replace GB15_enepW4 = 2.835191 if districtW4 == 10799
replace GB15_enepW4 = 2.634347 if districtW4 == 10800
replace GB15_enepW4 = 3.213033 if districtW4 == 10801
replace GB15_enepW4 = 2.850896 if districtW4 == 10802
replace GB15_enepW4 = 2.147491 if districtW4 == 10803
replace GB15_enepW4 = 3.312019 if districtW4 == 10804
replace GB15_enepW4 = 2.785101 if districtW4 == 10805
replace GB15_enepW4 = 2.449724 if districtW4 == 10806
replace GB15_enepW4 = 2.410037 if districtW4 == 10807
replace GB15_enepW4 = 2.094517 if districtW4 == 10808
replace GB15_enepW4 = 2.747529 if districtW4 == 10809
replace GB15_enepW4 = 3.33373 if districtW4 == 10810
replace GB15_enepW4 = 2.396348 if districtW4 == 10811
replace GB15_enepW4 = 2.713159 if districtW4 == 10812
replace GB15_enepW4 = 2.700377 if districtW4 == 10813
replace GB15_enepW4 = 2.782499 if districtW4 == 10814
replace GB15_enepW4 = 2.800289 if districtW4 == 10815
replace GB15_enepW4 = 2.880688 if districtW4 == 10816
replace GB15_enepW4 = 2.747174 if districtW4 == 10817
replace GB15_enepW4 = 2.607957 if districtW4 == 10818
replace GB15_enepW4 = 2.57656 if districtW4 == 10819
replace GB15_enepW4 = 2.953171 if districtW4 == 10820
replace GB15_enepW4 = 2.990378 if districtW4 == 10821
replace GB15_enepW4 = 2.919745 if districtW4 == 10822
replace GB15_enepW4 = 2.312055 if districtW4 == 10823
replace GB15_enepW4 = 2.433412 if districtW4 == 10824
replace GB15_enepW4 = 2.880998 if districtW4 == 10825
replace GB15_enepW4 = 3.077467 if districtW4 == 10826
replace GB15_enepW4 = 2.681305 if districtW4 == 10827
replace GB15_enepW4 = 2.460466 if districtW4 == 10828
replace GB15_enepW4 = 2.561241 if districtW4 == 10829
replace GB15_enepW4 = 2.406408 if districtW4 == 10830
replace GB15_enepW4 = 2.726152 if districtW4 == 10831
replace GB15_enepW4 = 3.221357 if districtW4 == 10832
replace GB15_enepW4 = 3.271585 if districtW4 == 10833
replace GB15_enepW4 = 3.174756 if districtW4 == 10834
replace GB15_enepW4 = 3.207855 if districtW4 == 10835
replace GB15_enepW4 = 2.554068 if districtW4 == 10836
replace GB15_enepW4 = 3.118198 if districtW4 == 10837
replace GB15_enepW4 = 3.343053 if districtW4 == 10838
replace GB15_enepW4 = 2.669665 if districtW4 == 10839
replace GB15_enepW4 = 2.670898 if districtW4 == 10840
replace GB15_enepW4 = 2.468368 if districtW4 == 10841
replace GB15_enepW4 = 2.644453 if districtW4 == 10842
replace GB15_enepW4 = 3.052674 if districtW4 == 10843
replace GB15_enepW4 = 2.154332 if districtW4 == 10844
replace GB15_enepW4 = 2.722754 if districtW4 == 10845
replace GB15_enepW4 = 3.002271 if districtW4 == 10846
replace GB15_enepW4 = 2.767416 if districtW4 == 10847
replace GB15_enepW4 = 3.477284 if districtW4 == 10848
replace GB15_enepW4 = 2.925464 if districtW4 == 10849
replace GB15_enepW4 = 2.906367 if districtW4 == 10850
replace GB15_enepW4 = 2.807885 if districtW4 == 10851
replace GB15_enepW4 = 2.936967 if districtW4 == 10852
replace GB15_enepW4 = 2.636229 if districtW4 == 10853
replace GB15_enepW4 = 2.941903 if districtW4 == 10854
replace GB15_enepW4 = 2.838165 if districtW4 == 10855
replace GB15_enepW4 = 3.195576 if districtW4 == 10856
replace GB15_enepW4 = 2.581811 if districtW4 == 10857
replace GB15_enepW4 = 2.852632 if districtW4 == 10858
replace GB15_enepW4 = 2.789878 if districtW4 == 10859
replace GB15_enepW4 = 2.652676 if districtW4 == 10860
replace GB15_enepW4 = 3.078978 if districtW4 == 10861
replace GB15_enepW4 = 3.219265 if districtW4 == 10862
replace GB15_enepW4 = 3.069821 if districtW4 == 10863
replace GB15_enepW4 = 3.904328 if districtW4 == 10864
replace GB15_enepW4 = 2.761178 if districtW4 == 10865
replace GB15_enepW4 = 2.648367 if districtW4 == 10866
replace GB15_enepW4 = 2.908082 if districtW4 == 10867
replace GB15_enepW4 = 2.852684 if districtW4 == 10868
replace GB15_enepW4 = 2.849852 if districtW4 == 10869
replace GB15_enepW4 = 3.614908 if districtW4 == 10870
replace GB15_enepW4 = 2.629363 if districtW4 == 10871
replace GB15_enepW4 = 2.579912 if districtW4 == 10872
replace GB15_enepW4 = 3.130139 if districtW4 == 10873
replace GB15_enepW4 = 3.169592 if districtW4 == 10874
replace GB15_enepW4 = 2.768054 if districtW4 == 10875
replace GB15_enepW4 = 3.227415 if districtW4 == 10876
replace GB15_enepW4 = 2.491143 if districtW4 == 10877
replace GB15_enepW4 = 3.205698 if districtW4 == 10878
replace GB15_enepW4 = 3.196522 if districtW4 == 10879
replace GB15_enepW4 = 3.291504 if districtW4 == 10880
replace GB15_enepW4 = 3.193393 if districtW4 == 10881
replace GB15_enepW4 = 2.408481 if districtW4 == 10882
replace GB15_enepW4 = 3.133713 if districtW4 == 10883
replace GB15_enepW4 = 4.295337 if districtW4 == 10884
replace GB15_enepW4 = 2.622525 if districtW4 == 10885
replace GB15_enepW4 = 2.721586 if districtW4 == 10886
replace GB15_enepW4 = 2.58058 if districtW4 == 10887
replace GB15_enepW4 = 2.71691 if districtW4 == 10888
replace GB15_enepW4 = 2.981063 if districtW4 == 10889
replace GB15_enepW4 = 2.81051 if districtW4 == 10890
replace GB15_enepW4 = 3.48423 if districtW4 == 10891
replace GB15_enepW4 = 2.888471 if districtW4 == 10892
replace GB15_enepW4 = 2.690144 if districtW4 == 10893
replace GB15_enepW4 = 3.146735 if districtW4 == 10894
replace GB15_enepW4 = 3.171283 if districtW4 == 10895
replace GB15_enepW4 = 2.52154 if districtW4 == 10896
replace GB15_enepW4 = 3.450467 if districtW4 == 10897
replace GB15_enepW4 = 3.051412 if districtW4 == 10898
replace GB15_enepW4 = 3.104257 if districtW4 == 10899
replace GB15_enepW4 = 2.802745 if districtW4 == 10900
replace GB15_enepW4 = 2.811903 if districtW4 == 10901
replace GB15_enepW4 = 2.773815 if districtW4 == 10902
replace GB15_enepW4 = 3.076777 if districtW4 == 10903
replace GB15_enepW4 = 2.611416 if districtW4 == 10904
replace GB15_enepW4 = 2.920841 if districtW4 == 10905
replace GB15_enepW4 = 2.432282 if districtW4 == 10906
replace GB15_enepW4 = 2.460171 if districtW4 == 10907
replace GB15_enepW4 = 2.842246 if districtW4 == 10908
replace GB15_enepW4 = 2.72601 if districtW4 == 10909
replace GB15_enepW4 = 2.677288 if districtW4 == 10910
replace GB15_enepW4 = 3.100245 if districtW4 == 10911
replace GB15_enepW4 = 2.772908 if districtW4 == 10912
replace GB15_enepW4 = 3.215642 if districtW4 == 10913
replace GB15_enepW4 = 3.174245 if districtW4 == 10914
replace GB15_enepW4 = 2.943069 if districtW4 == 10915
replace GB15_enepW4 = 2.570166 if districtW4 == 10916
replace GB15_enepW4 = 2.707428 if districtW4 == 10917
replace GB15_enepW4 = 2.626499 if districtW4 == 10918
replace GB15_enepW4 = 2.814683 if districtW4 == 10919
replace GB15_enepW4 = 2.887896 if districtW4 == 10920
replace GB15_enepW4 = 2.596431 if districtW4 == 10921
replace GB15_enepW4 = 3.20327 if districtW4 == 10922
replace GB15_enepW4 = 3.276241 if districtW4 == 10923
replace GB15_enepW4 = 2.826814 if districtW4 == 10924
replace GB15_enepW4 = 2.793314 if districtW4 == 10925
replace GB15_enepW4 = 3.189361 if districtW4 == 10926
replace GB15_enepW4 = 2.887805 if districtW4 == 10927
replace GB15_enepW4 = 2.731778 if districtW4 == 10928
replace GB15_enepW4 = 2.659514 if districtW4 == 10929
replace GB15_enepW4 = 2.742551 if districtW4 == 10930
replace GB15_enepW4 = 3.001698 if districtW4 == 10931
replace GB15_enepW4 = 2.912549 if districtW4 == 10932
replace GB15_enepW4 = 3.092889 if districtW4 == 10933
replace GB15_enepW4 = 3.039511 if districtW4 == 10934
replace GB15_enepW4 = 2.865854 if districtW4 == 10935
replace GB15_enepW4 = 3.067707 if districtW4 == 10936
replace GB15_enepW4 = 3.189448 if districtW4 == 10937
replace GB15_enepW4 = 3.134802 if districtW4 == 10938
replace GB15_enepW4 = 2.383076 if districtW4 == 10939
replace GB15_enepW4 = 2.722116 if districtW4 == 10940
replace GB15_enepW4 = 2.803074 if districtW4 == 10941
replace GB15_enepW4 = 2.422084 if districtW4 == 10942
replace GB15_enepW4 = 2.775167 if districtW4 == 10943
replace GB15_enepW4 = 2.919613 if districtW4 == 10944
replace GB15_enepW4 = 2.402272 if districtW4 == 10945
replace GB15_enepW4 = 2.858342 if districtW4 == 10946
replace GB15_enepW4 = 2.858625 if districtW4 == 10947
replace GB15_enepW4 = 3.246504 if districtW4 == 10948
replace GB15_enepW4 = 2.689791 if districtW4 == 10949
replace GB15_enepW4 = 2.654049 if districtW4 == 10950
replace GB15_enepW4 = 2.654553 if districtW4 == 10951
replace GB15_enepW4 = 2.883381 if districtW4 == 10952
replace GB15_enepW4 = 2.555134 if districtW4 == 10953
replace GB15_enepW4 = 2.935578 if districtW4 == 10954
replace GB15_enepW4 = 3.041299 if districtW4 == 10955
replace GB15_enepW4 = 3.347205 if districtW4 == 10956
replace GB15_enepW4 = 3.09288 if districtW4 == 10957
replace GB15_enepW4 = 4.157542 if districtW4 == 10958
replace GB15_enepW4 = 3.027745 if districtW4 == 10959
replace GB15_enepW4 = 3.189627 if districtW4 == 10960
replace GB15_enepW4 = 3.817502 if districtW4 == 10961
replace GB15_enepW4 = 2.56418 if districtW4 == 10962
replace GB15_enepW4 = 2.450651 if districtW4 == 10963
replace GB15_enepW4 = 3.529716 if districtW4 == 10964
replace GB15_enepW4 = 2.929984 if districtW4 == 10965
replace GB15_enepW4 = 2.782166 if districtW4 == 10966
replace GB15_enepW4 = 3.099694 if districtW4 == 10967
replace GB15_enepW4 = 2.960621 if districtW4 == 10968
replace GB15_enepW4 = 2.996721 if districtW4 == 10969
replace GB15_enepW4 = 2.801714 if districtW4 == 10970
replace GB15_enepW4 = 2.71688 if districtW4 == 10971
replace GB15_enepW4 = 3.781488 if districtW4 == 10972
replace GB15_enepW4 = 3.363783 if districtW4 == 10973
replace GB15_enepW4 = 3.255561 if districtW4 == 10974
replace GB15_enepW4 = 2.704068 if districtW4 == 10975
replace GB15_enepW4 = 2.928968 if districtW4 == 10976
replace GB15_enepW4 = 2.611244 if districtW4 == 10977
replace GB15_enepW4 = 2.768889 if districtW4 == 10978
replace GB15_enepW4 = 2.674897 if districtW4 == 10979
replace GB15_enepW4 = 2.769141 if districtW4 == 10980
replace GB15_enepW4 = 2.967681 if districtW4 == 10981
replace GB15_enepW4 = 2.892036 if districtW4 == 10982
replace GB15_enepW4 = 2.490461 if districtW4 == 10983
replace GB15_enepW4 = 3.222126 if districtW4 == 10984
replace GB15_enepW4 = 2.677015 if districtW4 == 10985
replace GB15_enepW4 = 2.823877 if districtW4 == 10986
replace GB15_enepW4 = 2.515925 if districtW4 == 10987
replace GB15_enepW4 = 3.290645 if districtW4 == 10988
replace GB15_enepW4 = 3.000815 if districtW4 == 10989
replace GB15_enepW4 = 2.805479 if districtW4 == 10990
replace GB15_enepW4 = 2.651192 if districtW4 == 10991
replace GB15_enepW4 = 2.891946 if districtW4 == 10992
replace GB15_enepW4 = 2.99773 if districtW4 == 10993
replace GB15_enepW4 = 3.028874 if districtW4 == 10994
replace GB15_enepW4 = 3.120763 if districtW4 == 10995
replace GB15_enepW4 = 2.858393 if districtW4 == 10996
replace GB15_enepW4 = 2.48302 if districtW4 == 10997
replace GB15_enepW4 = 2.486063 if districtW4 == 10998
replace GB15_enepW4 = 3.258775 if districtW4 == 10999
replace GB15_enepW4 = 3.069138 if districtW4 == 11000
replace GB15_enepW4 = 2.967526 if districtW4 == 11001
replace GB15_enepW4 = 2.08273 if districtW4 == 11002
replace GB15_enepW4 = 3.753735 if districtW4 == 11003
replace GB15_enepW4 = 2.561783 if districtW4 == 11004
replace GB15_enepW4 = 3.013188 if districtW4 == 11005
replace GB15_enepW4 = 2.798441 if districtW4 == 11006
replace GB15_enepW4 = 2.89511 if districtW4 == 11007
replace GB15_enepW4 = 2.667157 if districtW4 == 11008
replace GB15_enepW4 = 3.181858 if districtW4 == 11009
replace GB15_enepW4 = 2.32149 if districtW4 == 11010
replace GB15_enepW4 = 3.167256 if districtW4 == 11011
replace GB15_enepW4 = 2.81051 if districtW4 == 11012
replace GB15_enepW4 = 1.994833 if districtW4 == 11013
replace GB15_enepW4 = 2.976874 if districtW4 == 11014
replace GB15_enepW4 = 2.897216 if districtW4 == 11015
replace GB15_enepW4 = 2.468752 if districtW4 == 11016
replace GB15_enepW4 = 2.943496 if districtW4 == 11017
replace GB15_enepW4 = 2.823026 if districtW4 == 11018
replace GB15_enepW4 = 2.759693 if districtW4 == 11019
replace GB15_enepW4 = 2.645475 if districtW4 == 11020
replace GB15_enepW4 = 3.341131 if districtW4 == 11021
replace GB15_enepW4 = 2.903914 if districtW4 == 11022
replace GB15_enepW4 = 2.652168 if districtW4 == 11023
replace GB15_enepW4 = 2.710622 if districtW4 == 11024
replace GB15_enepW4 = 2.844819 if districtW4 == 11025
replace GB15_enepW4 = 2.974055 if districtW4 == 11026
replace GB15_enepW4 = 2.905807 if districtW4 == 11027
replace GB15_enepW4 = 2.448525 if districtW4 == 11028
replace GB15_enepW4 = 2.780212 if districtW4 == 11029
replace GB15_enepW4 = 2.895723 if districtW4 == 11030
replace GB15_enepW4 = 3.055033 if districtW4 == 11031
replace GB15_enepW4 = 1.995485 if districtW4 == 11032
replace GB15_enepW4 = 2.743275 if districtW4 == 11033
replace GB15_enepW4 = 2.826815 if districtW4 == 11034
replace GB15_enepW4 = 2.727213 if districtW4 == 11035
replace GB15_enepW4 = 2.511614 if districtW4 == 11036
replace GB15_enepW4 = 2.607501 if districtW4 == 11037
replace GB15_enepW4 = 3.241944 if districtW4 == 11038
replace GB15_enepW4 = 2.818462 if districtW4 == 11039
replace GB15_enepW4 = 2.781855 if districtW4 == 11040
replace GB15_enepW4 = 2.652687 if districtW4 == 11041
replace GB15_enepW4 = 2.280353 if districtW4 == 11042
replace GB15_enepW4 = 2.628657 if districtW4 == 11043
replace GB15_enepW4 = 2.47298 if districtW4 == 11044
replace GB15_enepW4 = 2.583333 if districtW4 == 11045
replace GB15_enepW4 = 2.454303 if districtW4 == 11046
replace GB15_enepW4 = 2.704251 if districtW4 == 11047
replace GB15_enepW4 = 2.605511 if districtW4 == 11048
replace GB15_enepW4 = 2.942324 if districtW4 == 11049
replace GB15_enepW4 = 2.657359 if districtW4 == 11050
replace GB15_enepW4 = 2.708455 if districtW4 == 11051
replace GB15_enepW4 = 2.941199 if districtW4 == 11052
replace GB15_enepW4 = 3.211444 if districtW4 == 11053
replace GB15_enepW4 = 3.111861 if districtW4 == 11054
replace GB15_enepW4 = 2.995207 if districtW4 == 11055
replace GB15_enepW4 = 2.969303 if districtW4 == 11056
replace GB15_enepW4 = 2.734235 if districtW4 == 11057
replace GB15_enepW4 = 3.440727 if districtW4 == 11058
replace GB15_enepW4 = 2.918598 if districtW4 == 11059
replace GB15_enepW4 = 3.177335 if districtW4 == 11060
replace GB15_enepW4 = 3.490355 if districtW4 == 11061
replace GB15_enepW4 = 3.050053 if districtW4 == 11062
replace GB15_enepW4 = 2.334552 if districtW4 == 40001
replace GB15_enepW4 = 2.864797 if districtW4 == 40002
replace GB15_enepW4 = 5.788406 if districtW4 == 40003
replace GB15_enepW4 = 2.86448 if districtW4 == 40004
replace GB15_enepW4 = 4.737517 if districtW4 == 40005
replace GB15_enepW4 = 3.811772 if districtW4 == 40006
replace GB15_enepW4 = 2.355271 if districtW4 == 40007
replace GB15_enepW4 = 2.886081 if districtW4 == 40008
replace GB15_enepW4 = 3.539254 if districtW4 == 40009
replace GB15_enepW4 = 3.363138 if districtW4 == 40010
replace GB15_enepW4 = 2.992864 if districtW4 == 40011
replace GB15_enepW4 = 4.001147 if districtW4 == 40012
replace GB15_enepW4 = 3.200016 if districtW4 == 40013
replace GB15_enepW4 = 4.288079 if districtW4 == 40014
replace GB15_enepW4 = 3.538909 if districtW4 == 40015
replace GB15_enepW4 = 3.953801 if districtW4 == 40016
replace GB15_enepW4 = 3.930045 if districtW4 == 40017
replace GB15_enepW4 = 3.653405 if districtW4 == 40018
replace GB15_enepW4 = 2.484403 if districtW4 == 20001
replace GB15_enepW4 = 3.332196 if districtW4 == 20002
replace GB15_enepW4 = 2.415369 if districtW4 == 20003
replace GB15_enepW4 = 2.575802 if districtW4 == 20004
replace GB15_enepW4 = 3.252698 if districtW4 == 20005
replace GB15_enepW4 = 2.833907 if districtW4 == 20006
replace GB15_enepW4 = 2.212734 if districtW4 == 20007
replace GB15_enepW4 = 3.314423 if districtW4 == 20008
replace GB15_enepW4 = 2.85009 if districtW4 == 20009
replace GB15_enepW4 = 2.610569 if districtW4 == 20010
replace GB15_enepW4 = 2.272925 if districtW4 == 20011
replace GB15_enepW4 = 2.195965 if districtW4 == 20012
replace GB15_enepW4 = 3.098379 if districtW4 == 20013
replace GB15_enepW4 = 3.041423 if districtW4 == 20014
replace GB15_enepW4 = 2.382902 if districtW4 == 20015
replace GB15_enepW4 = 2.231053 if districtW4 == 20016
replace GB15_enepW4 = 2.705646 if districtW4 == 20017
replace GB15_enepW4 = 3.155754 if districtW4 == 20018
replace GB15_enepW4 = 2.473215 if districtW4 == 20019
replace GB15_enepW4 = 3.15771 if districtW4 == 20020
replace GB15_enepW4 = 3.038411 if districtW4 == 20021
replace GB15_enepW4 = 2.886224 if districtW4 == 20022
replace GB15_enepW4 = 3.370319 if districtW4 == 20023
replace GB15_enepW4 = 3.317815 if districtW4 == 20024
replace GB15_enepW4 = 3.303192 if districtW4 == 20025
replace GB15_enepW4 = 3.435289 if districtW4 == 20026
replace GB15_enepW4 = 2.576265 if districtW4 == 20027
replace GB15_enepW4 = 2.426279 if districtW4 == 20028
replace GB15_enepW4 = 2.556553 if districtW4 == 20029
replace GB15_enepW4 = 2.312431 if districtW4 == 20030
replace GB15_enepW4 = 2.694706 if districtW4 == 20031
replace GB15_enepW4 = 2.20721 if districtW4 == 20032
replace GB15_enepW4 = 2.492724 if districtW4 == 20033
replace GB15_enepW4 = 2.496854 if districtW4 == 20034
replace GB15_enepW4 = 2.28412 if districtW4 == 20035
replace GB15_enepW4 = 2.186123 if districtW4 == 20036
replace GB15_enepW4 = 2.842826 if districtW4 == 20037
replace GB15_enepW4 = 2.4601 if districtW4 == 20038
replace GB15_enepW4 = 2.788209 if districtW4 == 20039
replace GB15_enepW4 = 2.393499 if districtW4 == 20040
replace GB15_enepW4 = 2.531497 if districtW4 == 20041
replace GB15_enepW4 = 2.793774 if districtW4 == 20042
replace GB15_enepW4 = 2.612959 if districtW4 == 20043
replace GB15_enepW4 = 2.427917 if districtW4 == 20044
replace GB15_enepW4 = 2.753754 if districtW4 == 20045
replace GB15_enepW4 = 2.821377 if districtW4 == 20046
replace GB15_enepW4 = 2.336027 if districtW4 == 20047
replace GB15_enepW4 = 2.606494 if districtW4 == 20048
replace GB15_enepW4 = 3.344232 if districtW4 == 20049
replace GB15_enepW4 = 2.971796 if districtW4 == 20050
replace GB15_enepW4 = 3.035235 if districtW4 == 20051
replace GB15_enepW4 = 2.629501 if districtW4 == 20052
replace GB15_enepW4 = 2.408631 if districtW4 == 20053
replace GB15_enepW4 = 2.693521 if districtW4 == 20054
replace GB15_enepW4 = 2.721501 if districtW4 == 20055
replace GB15_enepW4 = 2.45726 if districtW4 == 20056
replace GB15_enepW4 = 3.045974 if districtW4 == 20057
replace GB15_enepW4 = 3.284745 if districtW4 == 20058
replace GB15_enepW4 = 2.211492 if districtW4 == 20059
replace GB15_enepW4 = 3.898479 if districtW4 == 30041
replace GB15_enepW4 = 3.306537 if districtW4 == 30042
replace GB15_enepW4 = 3.366684 if districtW4 == 30043
replace GB15_enepW4 = 3.679038 if districtW4 == 30044
replace GB15_enepW4 = 3.684336 if districtW4 == 30045
replace GB15_enepW4 = 3.396335 if districtW4 == 30046
replace GB15_enepW4 = 3.769637 if districtW4 == 30047
replace GB15_enepW4 = 2.889722 if districtW4 == 30048
replace GB15_enepW4 = 3.383662 if districtW4 == 30049
replace GB15_enepW4 = 3.760677 if districtW4 == 30050
replace GB15_enepW4 = 2.970621 if districtW4 == 30051
replace GB15_enepW4 = 2.852182 if districtW4 == 30052
replace GB15_enepW4 = 3.40194 if districtW4 == 30053
replace GB15_enepW4 = 2.962665 if districtW4 == 30054
replace GB15_enepW4 = 3.5684 if districtW4 == 30055
replace GB15_enepW4 = 3.300743 if districtW4 == 30056
replace GB15_enepW4 = 3.226293 if districtW4 == 30057
replace GB15_enepW4 = 3.549702 if districtW4 == 30058
replace GB15_enepW4 = 3.487929 if districtW4 == 30059
replace GB15_enepW4 = 3.106982 if districtW4 == 30060
replace GB15_enepW4 = 3.950041 if districtW4 == 30061
replace GB15_enepW4 = 3.731118 if districtW4 == 30062
replace GB15_enepW4 = 3.244651 if districtW4 == 30063
replace GB15_enepW4 = 4.165496 if districtW4 == 30064
replace GB15_enepW4 = 3.740136 if districtW4 == 30065
replace GB15_enepW4 = 3.343867 if districtW4 == 30066
replace GB15_enepW4 = 3.778436 if districtW4 == 30067
replace GB15_enepW4 = 3.566676 if districtW4 == 30068
replace GB15_enepW4 = 3.608055 if districtW4 == 30069
replace GB15_enepW4 = 3.348032 if districtW4 == 30070
replace GB15_enepW4 = 2.888039 if districtW4 == 30071
replace GB15_enepW4 = 2.568687 if districtW4 == 30072
replace GB15_enepW4 = 3.691674 if districtW4 == 30073
replace GB15_enepW4 = 2.932935 if districtW4 == 30074
replace GB15_enepW4 = 4.04245 if districtW4 == 30075
replace GB15_enepW4 = 3.519851 if districtW4 == 30076
replace GB15_enepW4 = 3.187399 if districtW4 == 30077
replace GB15_enepW4 = 2.995445 if districtW4 == 30078
replace GB15_enepW4 = 3.783493 if districtW4 == 30079
replace GB15_enepW4 = 3.53074 if districtW4 == 30080

gen GB15_enepW5 = .

replace GB15_enepW5 = 3.019356 if districtW5 == 10530
replace GB15_enepW5 = 2.769631 if districtW5 == 10531
replace GB15_enepW5 = 2.724512 if districtW5 == 10532
replace GB15_enepW5 = 2.931851 if districtW5 == 10533
replace GB15_enepW5 = 2.426326 if districtW5 == 10534
replace GB15_enepW5 = 3.492003 if districtW5 == 10535
replace GB15_enepW5 = 2.857112 if districtW5 == 10536
replace GB15_enepW5 = 2.889848 if districtW5 == 10537
replace GB15_enepW5 = 3.018114 if districtW5 == 10538
replace GB15_enepW5 = 2.845595 if districtW5 == 10539
replace GB15_enepW5 = 2.443873 if districtW5 == 10540
replace GB15_enepW5 = 2.619029 if districtW5 == 10541
replace GB15_enepW5 = 2.64931 if districtW5 == 10542
replace GB15_enepW5 = 2.791105 if districtW5 == 10543
replace GB15_enepW5 = 2.670943 if districtW5 == 10544
replace GB15_enepW5 = 2.920615 if districtW5 == 10545
replace GB15_enepW5 = 2.800022 if districtW5 == 10546
replace GB15_enepW5 = 3.75046 if districtW5 == 10547
replace GB15_enepW5 = 3.127466 if districtW5 == 10548
replace GB15_enepW5 = 2.415739 if districtW5 == 10549
replace GB15_enepW5 = 2.277258 if districtW5 == 10550
replace GB15_enepW5 = 2.578543 if districtW5 == 10551
replace GB15_enepW5 = 2.817124 if districtW5 == 10552
replace GB15_enepW5 = 3.098189 if districtW5 == 10553
replace GB15_enepW5 = 3.466405 if districtW5 == 10554
replace GB15_enepW5 = 2.424269 if districtW5 == 10555
replace GB15_enepW5 = 3.063132 if districtW5 == 10556
replace GB15_enepW5 = 2.760567 if districtW5 == 10557
replace GB15_enepW5 = 2.962383 if districtW5 == 10558
replace GB15_enepW5 = 2.032964 if districtW5 == 10559
replace GB15_enepW5 = 2.779283 if districtW5 == 10560
replace GB15_enepW5 = 2.984036 if districtW5 == 10561
replace GB15_enepW5 = 2.455388 if districtW5 == 10562
replace GB15_enepW5 = 2.006761 if districtW5 == 10563
replace GB15_enepW5 = 1.772724 if districtW5 == 10564
replace GB15_enepW5 = 3.025247 if districtW5 == 10565
replace GB15_enepW5 = 2.535539 if districtW5 == 10566
replace GB15_enepW5 = 3.00285 if districtW5 == 10567
replace GB15_enepW5 = 3.512263 if districtW5 == 10568
replace GB15_enepW5 = 3.203588 if districtW5 == 10569
replace GB15_enepW5 = 2.427308 if districtW5 == 10570
replace GB15_enepW5 = 2.296087 if districtW5 == 10571
replace GB15_enepW5 = 2.85857 if districtW5 == 10572
replace GB15_enepW5 = 3.122542 if districtW5 == 10573
replace GB15_enepW5 = 3.134684 if districtW5 == 10574
replace GB15_enepW5 = 3.161563 if districtW5 == 10575
replace GB15_enepW5 = 2.944597 if districtW5 == 10576
replace GB15_enepW5 = 2.721511 if districtW5 == 10577
replace GB15_enepW5 = 3.038856 if districtW5 == 10578
replace GB15_enepW5 = 2.830414 if districtW5 == 10579
replace GB15_enepW5 = 2.923068 if districtW5 == 10580
replace GB15_enepW5 = 1.74085 if districtW5 == 10581
replace GB15_enepW5 = 2.992774 if districtW5 == 10582
replace GB15_enepW5 = 3.402826 if districtW5 == 10583
replace GB15_enepW5 = 3.228405 if districtW5 == 10584
replace GB15_enepW5 = 3.224344 if districtW5 == 10585
replace GB15_enepW5 = 2.691676 if districtW5 == 10586
replace GB15_enepW5 = 3.050441 if districtW5 == 10587
replace GB15_enepW5 = 3.149039 if districtW5 == 10588
replace GB15_enepW5 = 3.10569 if districtW5 == 10589
replace GB15_enepW5 = 2.755727 if districtW5 == 10590
replace GB15_enepW5 = 2.28564 if districtW5 == 10591
replace GB15_enepW5 = 2.427649 if districtW5 == 10592
replace GB15_enepW5 = 2.617934 if districtW5 == 10593
replace GB15_enepW5 = 2.508872 if districtW5 == 10594
replace GB15_enepW5 = 3.370277 if districtW5 == 10595
replace GB15_enepW5 = 2.632189 if districtW5 == 10596
replace GB15_enepW5 = 2.992068 if districtW5 == 10597
replace GB15_enepW5 = 3.285373 if districtW5 == 10598
replace GB15_enepW5 = 3.54074 if districtW5 == 10599
replace GB15_enepW5 = 3.053307 if districtW5 == 10600
replace GB15_enepW5 = 3.929509 if districtW5 == 10601
replace GB15_enepW5 = 3.866528 if districtW5 == 10602
replace GB15_enepW5 = 3.034416 if districtW5 == 10603
replace GB15_enepW5 = 2.808555 if districtW5 == 10604
replace GB15_enepW5 = 2.7225 if districtW5 == 10605
replace GB15_enepW5 = 2.573158 if districtW5 == 10606
replace GB15_enepW5 = 2.805386 if districtW5 == 10607
replace GB15_enepW5 = 2.074871 if districtW5 == 10608
replace GB15_enepW5 = 3.61247 if districtW5 == 10609
replace GB15_enepW5 = 2.808543 if districtW5 == 10610
replace GB15_enepW5 = 2.76828 if districtW5 == 10611
replace GB15_enepW5 = 2.916198 if districtW5 == 10612
replace GB15_enepW5 = 2.853732 if districtW5 == 10613
replace GB15_enepW5 = 3.015301 if districtW5 == 10614
replace GB15_enepW5 = 2.311352 if districtW5 == 10615
replace GB15_enepW5 = 3.774472 if districtW5 == 10616
replace GB15_enepW5 = 3.511832 if districtW5 == 10617
replace GB15_enepW5 = 2.935856 if districtW5 == 10618
replace GB15_enepW5 = 3.558304 if districtW5 == 10619
replace GB15_enepW5 = 2.808913 if districtW5 == 10620
replace GB15_enepW5 = 3.737658 if districtW5 == 10621
replace GB15_enepW5 = 2.660426 if districtW5 == 10622
replace GB15_enepW5 = 3.03516 if districtW5 == 10623
replace GB15_enepW5 = 2.668502 if districtW5 == 10624
replace GB15_enepW5 = 2.679112 if districtW5 == 10625
replace GB15_enepW5 = 2.867078 if districtW5 == 10626
replace GB15_enepW5 = 3.170948 if districtW5 == 10627
replace GB15_enepW5 = 3.009329 if districtW5 == 10628
replace GB15_enepW5 = 2.191413 if districtW5 == 10629
replace GB15_enepW5 = 2.929892 if districtW5 == 10630
replace GB15_enepW5 = 2.53273 if districtW5 == 10631
replace GB15_enepW5 = 3.231987 if districtW5 == 10632
replace GB15_enepW5 = 2.623266 if districtW5 == 10633
replace GB15_enepW5 = 2.992692 if districtW5 == 10634
replace GB15_enepW5 = 3.00868 if districtW5 == 10635
replace GB15_enepW5 = 2.754156 if districtW5 == 10636
replace GB15_enepW5 = 2.817628 if districtW5 == 10637
replace GB15_enepW5 = 2.506024 if districtW5 == 10638
replace GB15_enepW5 = 2.646348 if districtW5 == 10639
replace GB15_enepW5 = 2.618104 if districtW5 == 10640
replace GB15_enepW5 = 3.304492 if districtW5 == 10641
replace GB15_enepW5 = 2.828275 if districtW5 == 10642
replace GB15_enepW5 = 2.958084 if districtW5 == 10643
replace GB15_enepW5 = 3.698987 if districtW5 == 10644
replace GB15_enepW5 = 2.985609 if districtW5 == 10645
replace GB15_enepW5 = 2.828629 if districtW5 == 10646
replace GB15_enepW5 = 3.003869 if districtW5 == 10647
replace GB15_enepW5 = 2.849055 if districtW5 == 10648
replace GB15_enepW5 = 2.850522 if districtW5 == 10649
replace GB15_enepW5 = 3.398499 if districtW5 == 10650
replace GB15_enepW5 = 3.110316 if districtW5 == 10651
replace GB15_enepW5 = 2.810557 if districtW5 == 10652
replace GB15_enepW5 = 2.727928 if districtW5 == 10653
replace GB15_enepW5 = 2.65786 if districtW5 == 10654
replace GB15_enepW5 = 2.221941 if districtW5 == 10655
replace GB15_enepW5 = 2.670741 if districtW5 == 10656
replace GB15_enepW5 = 3.118343 if districtW5 == 10657
replace GB15_enepW5 = 3.045423 if districtW5 == 10658
replace GB15_enepW5 = 2.89444 if districtW5 == 10659
replace GB15_enepW5 = 2.504936 if districtW5 == 10660
replace GB15_enepW5 = 2.846731 if districtW5 == 10661
replace GB15_enepW5 = 3.355442 if districtW5 == 10662
replace GB15_enepW5 = 2.923609 if districtW5 == 10663
replace GB15_enepW5 = 2.86877 if districtW5 == 10664
replace GB15_enepW5 = 2.605488 if districtW5 == 10665
replace GB15_enepW5 = 2.902349 if districtW5 == 10666
replace GB15_enepW5 = 2.998601 if districtW5 == 10667
replace GB15_enepW5 = 2.906168 if districtW5 == 10668
replace GB15_enepW5 = 2.772675 if districtW5 == 10669
replace GB15_enepW5 = 3.081032 if districtW5 == 10670
replace GB15_enepW5 = 3.052195 if districtW5 == 10671
replace GB15_enepW5 = 2.987391 if districtW5 == 10672
replace GB15_enepW5 = 2.751746 if districtW5 == 10673
replace GB15_enepW5 = 2.66217 if districtW5 == 10674
replace GB15_enepW5 = 2.493388 if districtW5 == 10675
replace GB15_enepW5 = 2.108326 if districtW5 == 10676
replace GB15_enepW5 = 2.347605 if districtW5 == 10677
replace GB15_enepW5 = 3.289593 if districtW5 == 10678
replace GB15_enepW5 = 1.613408 if districtW5 == 10679
replace GB15_enepW5 = 2.446707 if districtW5 == 10680
replace GB15_enepW5 = 2.613276 if districtW5 == 10681
replace GB15_enepW5 = 3.143018 if districtW5 == 10682
replace GB15_enepW5 = 2.980947 if districtW5 == 10683
replace GB15_enepW5 = 3.099804 if districtW5 == 10684
replace GB15_enepW5 = 3.474996 if districtW5 == 10685
replace GB15_enepW5 = 2.935463 if districtW5 == 10686
replace GB15_enepW5 = 2.254275 if districtW5 == 10687
replace GB15_enepW5 = 2.763564 if districtW5 == 10688
replace GB15_enepW5 = 2.755147 if districtW5 == 10689
replace GB15_enepW5 = 2.955771 if districtW5 == 10690
replace GB15_enepW5 = 2.690508 if districtW5 == 10691
replace GB15_enepW5 = 2.496044 if districtW5 == 10692
replace GB15_enepW5 = 2.733729 if districtW5 == 10693
replace GB15_enepW5 = 2.573889 if districtW5 == 10694
replace GB15_enepW5 = 2.987936 if districtW5 == 10695
replace GB15_enepW5 = 2.82654 if districtW5 == 10696
replace GB15_enepW5 = 2.314546 if districtW5 == 10697
replace GB15_enepW5 = 2.944063 if districtW5 == 10698
replace GB15_enepW5 = 2.715412 if districtW5 == 10699
replace GB15_enepW5 = 2.778743 if districtW5 == 10700
replace GB15_enepW5 = 2.659511 if districtW5 == 10701
replace GB15_enepW5 = 3.142867 if districtW5 == 10702
replace GB15_enepW5 = 2.381215 if districtW5 == 10703
replace GB15_enepW5 = 3.200631 if districtW5 == 10704
replace GB15_enepW5 = 3.150823 if districtW5 == 10705
replace GB15_enepW5 = 3.229531 if districtW5 == 10706
replace GB15_enepW5 = 2.8347 if districtW5 == 10707
replace GB15_enepW5 = 1.969877 if districtW5 == 10708
replace GB15_enepW5 = 2.620913 if districtW5 == 10709
replace GB15_enepW5 = 3.006004 if districtW5 == 10710
replace GB15_enepW5 = 2.976339 if districtW5 == 10711
replace GB15_enepW5 = 3.038272 if districtW5 == 10712
replace GB15_enepW5 = 2.696071 if districtW5 == 10713
replace GB15_enepW5 = 2.909893 if districtW5 == 10714
replace GB15_enepW5 = 2.892786 if districtW5 == 10715
replace GB15_enepW5 = 3.415253 if districtW5 == 10716
replace GB15_enepW5 = 3.09359 if districtW5 == 10717
replace GB15_enepW5 = 2.796212 if districtW5 == 10718
replace GB15_enepW5 = 2.671487 if districtW5 == 10719
replace GB15_enepW5 = 2.267147 if districtW5 == 10720
replace GB15_enepW5 = 2.222984 if districtW5 == 10721
replace GB15_enepW5 = 2.8905 if districtW5 == 10722
replace GB15_enepW5 = 3.019511 if districtW5 == 10723
replace GB15_enepW5 = 2.761207 if districtW5 == 10724
replace GB15_enepW5 = 2.23499 if districtW5 == 10725
replace GB15_enepW5 = 2.573292 if districtW5 == 10726
replace GB15_enepW5 = 2.614538 if districtW5 == 10727
replace GB15_enepW5 = 2.923684 if districtW5 == 10728
replace GB15_enepW5 = 2.807575 if districtW5 == 10729
replace GB15_enepW5 = 2.853377 if districtW5 == 10730
replace GB15_enepW5 = 2.371981 if districtW5 == 10731
replace GB15_enepW5 = 2.483485 if districtW5 == 10732
replace GB15_enepW5 = 3.895663 if districtW5 == 10733
replace GB15_enepW5 = 2.964417 if districtW5 == 10734
replace GB15_enepW5 = 2.923414 if districtW5 == 10735
replace GB15_enepW5 = 2.925459 if districtW5 == 10736
replace GB15_enepW5 = 2.319618 if districtW5 == 10737
replace GB15_enepW5 = 3.492272 if districtW5 == 10738
replace GB15_enepW5 = 2.768628 if districtW5 == 10739
replace GB15_enepW5 = 2.791343 if districtW5 == 10740
replace GB15_enepW5 = 2.4023 if districtW5 == 10741
replace GB15_enepW5 = 2.586136 if districtW5 == 10742
replace GB15_enepW5 = 2.963099 if districtW5 == 10743
replace GB15_enepW5 = 2.677219 if districtW5 == 10744
replace GB15_enepW5 = 2.374853 if districtW5 == 10745
replace GB15_enepW5 = 2.798527 if districtW5 == 10746
replace GB15_enepW5 = 3.05248 if districtW5 == 10747
replace GB15_enepW5 = 2.910922 if districtW5 == 10748
replace GB15_enepW5 = 2.607893 if districtW5 == 10749
replace GB15_enepW5 = 2.849552 if districtW5 == 10750
replace GB15_enepW5 = 2.89286 if districtW5 == 10751
replace GB15_enepW5 = 2.687326 if districtW5 == 10752
replace GB15_enepW5 = 2.656974 if districtW5 == 10753
replace GB15_enepW5 = 2.594094 if districtW5 == 10754
replace GB15_enepW5 = 2.872295 if districtW5 == 10755
replace GB15_enepW5 = 3.295562 if districtW5 == 10756
replace GB15_enepW5 = 2.848907 if districtW5 == 10757
replace GB15_enepW5 = 3.067704 if districtW5 == 10758
replace GB15_enepW5 = 2.60912 if districtW5 == 10759
replace GB15_enepW5 = 2.079338 if districtW5 == 10760
replace GB15_enepW5 = 2.827201 if districtW5 == 10761
replace GB15_enepW5 = 3.966754 if districtW5 == 10762
replace GB15_enepW5 = 2.432467 if districtW5 == 10763
replace GB15_enepW5 = 3.008915 if districtW5 == 10764
replace GB15_enepW5 = 2.632408 if districtW5 == 10765
replace GB15_enepW5 = 2.804272 if districtW5 == 10766
replace GB15_enepW5 = 2.574673 if districtW5 == 10767
replace GB15_enepW5 = 2.647651 if districtW5 == 10768
replace GB15_enepW5 = 2.778704 if districtW5 == 10769
replace GB15_enepW5 = 3.328093 if districtW5 == 10770
replace GB15_enepW5 = 2.875104 if districtW5 == 10771
replace GB15_enepW5 = 2.944402 if districtW5 == 10772
replace GB15_enepW5 = 3.097446 if districtW5 == 10773
replace GB15_enepW5 = 2.895979 if districtW5 == 10774
replace GB15_enepW5 = 1.598065 if districtW5 == 10775
replace GB15_enepW5 = 2.89215 if districtW5 == 10776
replace GB15_enepW5 = 2.746339 if districtW5 == 10777
replace GB15_enepW5 = 2.696688 if districtW5 == 10778
replace GB15_enepW5 = 2.862387 if districtW5 == 10779
replace GB15_enepW5 = 3.70042 if districtW5 == 10780
replace GB15_enepW5 = 3.185162 if districtW5 == 10781
replace GB15_enepW5 = 2.292944 if districtW5 == 10782
replace GB15_enepW5 = 2.417135 if districtW5 == 10783
replace GB15_enepW5 = 3.159471 if districtW5 == 10784
replace GB15_enepW5 = 2.62274 if districtW5 == 10785
replace GB15_enepW5 = 3.363049 if districtW5 == 10786
replace GB15_enepW5 = 2.66832 if districtW5 == 10787
replace GB15_enepW5 = 2.996799 if districtW5 == 10788
replace GB15_enepW5 = 2.465597 if districtW5 == 10789
replace GB15_enepW5 = 2.477428 if districtW5 == 10790
replace GB15_enepW5 = 2.685093 if districtW5 == 10791
replace GB15_enepW5 = 2.816371 if districtW5 == 10792
replace GB15_enepW5 = 2.069739 if districtW5 == 10793
replace GB15_enepW5 = 1.487202 if districtW5 == 10794
replace GB15_enepW5 = 1.985524 if districtW5 == 10795
replace GB15_enepW5 = 1.723602 if districtW5 == 10796
replace GB15_enepW5 = 2.76407 if districtW5 == 10797
replace GB15_enepW5 = 2.912765 if districtW5 == 10798
replace GB15_enepW5 = 2.835191 if districtW5 == 10799
replace GB15_enepW5 = 2.634347 if districtW5 == 10800
replace GB15_enepW5 = 3.213033 if districtW5 == 10801
replace GB15_enepW5 = 2.850896 if districtW5 == 10802
replace GB15_enepW5 = 2.147491 if districtW5 == 10803
replace GB15_enepW5 = 3.312019 if districtW5 == 10804
replace GB15_enepW5 = 2.785101 if districtW5 == 10805
replace GB15_enepW5 = 2.449724 if districtW5 == 10806
replace GB15_enepW5 = 2.410037 if districtW5 == 10807
replace GB15_enepW5 = 2.094517 if districtW5 == 10808
replace GB15_enepW5 = 2.747529 if districtW5 == 10809
replace GB15_enepW5 = 3.33373 if districtW5 == 10810
replace GB15_enepW5 = 2.396348 if districtW5 == 10811
replace GB15_enepW5 = 2.713159 if districtW5 == 10812
replace GB15_enepW5 = 2.700377 if districtW5 == 10813
replace GB15_enepW5 = 2.782499 if districtW5 == 10814
replace GB15_enepW5 = 2.800289 if districtW5 == 10815
replace GB15_enepW5 = 2.880688 if districtW5 == 10816
replace GB15_enepW5 = 2.747174 if districtW5 == 10817
replace GB15_enepW5 = 2.607957 if districtW5 == 10818
replace GB15_enepW5 = 2.57656 if districtW5 == 10819
replace GB15_enepW5 = 2.953171 if districtW5 == 10820
replace GB15_enepW5 = 2.990378 if districtW5 == 10821
replace GB15_enepW5 = 2.919745 if districtW5 == 10822
replace GB15_enepW5 = 2.312055 if districtW5 == 10823
replace GB15_enepW5 = 2.433412 if districtW5 == 10824
replace GB15_enepW5 = 2.880998 if districtW5 == 10825
replace GB15_enepW5 = 3.077467 if districtW5 == 10826
replace GB15_enepW5 = 2.681305 if districtW5 == 10827
replace GB15_enepW5 = 2.460466 if districtW5 == 10828
replace GB15_enepW5 = 2.561241 if districtW5 == 10829
replace GB15_enepW5 = 2.406408 if districtW5 == 10830
replace GB15_enepW5 = 2.726152 if districtW5 == 10831
replace GB15_enepW5 = 3.221357 if districtW5 == 10832
replace GB15_enepW5 = 3.271585 if districtW5 == 10833
replace GB15_enepW5 = 3.174756 if districtW5 == 10834
replace GB15_enepW5 = 3.207855 if districtW5 == 10835
replace GB15_enepW5 = 2.554068 if districtW5 == 10836
replace GB15_enepW5 = 3.118198 if districtW5 == 10837
replace GB15_enepW5 = 3.343053 if districtW5 == 10838
replace GB15_enepW5 = 2.669665 if districtW5 == 10839
replace GB15_enepW5 = 2.670898 if districtW5 == 10840
replace GB15_enepW5 = 2.468368 if districtW5 == 10841
replace GB15_enepW5 = 2.644453 if districtW5 == 10842
replace GB15_enepW5 = 3.052674 if districtW5 == 10843
replace GB15_enepW5 = 2.154332 if districtW5 == 10844
replace GB15_enepW5 = 2.722754 if districtW5 == 10845
replace GB15_enepW5 = 3.002271 if districtW5 == 10846
replace GB15_enepW5 = 2.767416 if districtW5 == 10847
replace GB15_enepW5 = 3.477284 if districtW5 == 10848
replace GB15_enepW5 = 2.925464 if districtW5 == 10849
replace GB15_enepW5 = 2.906367 if districtW5 == 10850
replace GB15_enepW5 = 2.807885 if districtW5 == 10851
replace GB15_enepW5 = 2.936967 if districtW5 == 10852
replace GB15_enepW5 = 2.636229 if districtW5 == 10853
replace GB15_enepW5 = 2.941903 if districtW5 == 10854
replace GB15_enepW5 = 2.838165 if districtW5 == 10855
replace GB15_enepW5 = 3.195576 if districtW5 == 10856
replace GB15_enepW5 = 2.581811 if districtW5 == 10857
replace GB15_enepW5 = 2.852632 if districtW5 == 10858
replace GB15_enepW5 = 2.789878 if districtW5 == 10859
replace GB15_enepW5 = 2.652676 if districtW5 == 10860
replace GB15_enepW5 = 3.078978 if districtW5 == 10861
replace GB15_enepW5 = 3.219265 if districtW5 == 10862
replace GB15_enepW5 = 3.069821 if districtW5 == 10863
replace GB15_enepW5 = 3.904328 if districtW5 == 10864
replace GB15_enepW5 = 2.761178 if districtW5 == 10865
replace GB15_enepW5 = 2.648367 if districtW5 == 10866
replace GB15_enepW5 = 2.908082 if districtW5 == 10867
replace GB15_enepW5 = 2.852684 if districtW5 == 10868
replace GB15_enepW5 = 2.849852 if districtW5 == 10869
replace GB15_enepW5 = 3.614908 if districtW5 == 10870
replace GB15_enepW5 = 2.629363 if districtW5 == 10871
replace GB15_enepW5 = 2.579912 if districtW5 == 10872
replace GB15_enepW5 = 3.130139 if districtW5 == 10873
replace GB15_enepW5 = 3.169592 if districtW5 == 10874
replace GB15_enepW5 = 2.768054 if districtW5 == 10875
replace GB15_enepW5 = 3.227415 if districtW5 == 10876
replace GB15_enepW5 = 2.491143 if districtW5 == 10877
replace GB15_enepW5 = 3.205698 if districtW5 == 10878
replace GB15_enepW5 = 3.196522 if districtW5 == 10879
replace GB15_enepW5 = 3.291504 if districtW5 == 10880
replace GB15_enepW5 = 3.193393 if districtW5 == 10881
replace GB15_enepW5 = 2.408481 if districtW5 == 10882
replace GB15_enepW5 = 3.133713 if districtW5 == 10883
replace GB15_enepW5 = 4.295337 if districtW5 == 10884
replace GB15_enepW5 = 2.622525 if districtW5 == 10885
replace GB15_enepW5 = 2.721586 if districtW5 == 10886
replace GB15_enepW5 = 2.58058 if districtW5 == 10887
replace GB15_enepW5 = 2.71691 if districtW5 == 10888
replace GB15_enepW5 = 2.981063 if districtW5 == 10889
replace GB15_enepW5 = 2.81051 if districtW5 == 10890
replace GB15_enepW5 = 3.48423 if districtW5 == 10891
replace GB15_enepW5 = 2.888471 if districtW5 == 10892
replace GB15_enepW5 = 2.690144 if districtW5 == 10893
replace GB15_enepW5 = 3.146735 if districtW5 == 10894
replace GB15_enepW5 = 3.171283 if districtW5 == 10895
replace GB15_enepW5 = 2.52154 if districtW5 == 10896
replace GB15_enepW5 = 3.450467 if districtW5 == 10897
replace GB15_enepW5 = 3.051412 if districtW5 == 10898
replace GB15_enepW5 = 3.104257 if districtW5 == 10899
replace GB15_enepW5 = 2.802745 if districtW5 == 10900
replace GB15_enepW5 = 2.811903 if districtW5 == 10901
replace GB15_enepW5 = 2.773815 if districtW5 == 10902
replace GB15_enepW5 = 3.076777 if districtW5 == 10903
replace GB15_enepW5 = 2.611416 if districtW5 == 10904
replace GB15_enepW5 = 2.920841 if districtW5 == 10905
replace GB15_enepW5 = 2.432282 if districtW5 == 10906
replace GB15_enepW5 = 2.460171 if districtW5 == 10907
replace GB15_enepW5 = 2.842246 if districtW5 == 10908
replace GB15_enepW5 = 2.72601 if districtW5 == 10909
replace GB15_enepW5 = 2.677288 if districtW5 == 10910
replace GB15_enepW5 = 3.100245 if districtW5 == 10911
replace GB15_enepW5 = 2.772908 if districtW5 == 10912
replace GB15_enepW5 = 3.215642 if districtW5 == 10913
replace GB15_enepW5 = 3.174245 if districtW5 == 10914
replace GB15_enepW5 = 2.943069 if districtW5 == 10915
replace GB15_enepW5 = 2.570166 if districtW5 == 10916
replace GB15_enepW5 = 2.707428 if districtW5 == 10917
replace GB15_enepW5 = 2.626499 if districtW5 == 10918
replace GB15_enepW5 = 2.814683 if districtW5 == 10919
replace GB15_enepW5 = 2.887896 if districtW5 == 10920
replace GB15_enepW5 = 2.596431 if districtW5 == 10921
replace GB15_enepW5 = 3.20327 if districtW5 == 10922
replace GB15_enepW5 = 3.276241 if districtW5 == 10923
replace GB15_enepW5 = 2.826814 if districtW5 == 10924
replace GB15_enepW5 = 2.793314 if districtW5 == 10925
replace GB15_enepW5 = 3.189361 if districtW5 == 10926
replace GB15_enepW5 = 2.887805 if districtW5 == 10927
replace GB15_enepW5 = 2.731778 if districtW5 == 10928
replace GB15_enepW5 = 2.659514 if districtW5 == 10929
replace GB15_enepW5 = 2.742551 if districtW5 == 10930
replace GB15_enepW5 = 3.001698 if districtW5 == 10931
replace GB15_enepW5 = 2.912549 if districtW5 == 10932
replace GB15_enepW5 = 3.092889 if districtW5 == 10933
replace GB15_enepW5 = 3.039511 if districtW5 == 10934
replace GB15_enepW5 = 2.865854 if districtW5 == 10935
replace GB15_enepW5 = 3.067707 if districtW5 == 10936
replace GB15_enepW5 = 3.189448 if districtW5 == 10937
replace GB15_enepW5 = 3.134802 if districtW5 == 10938
replace GB15_enepW5 = 2.383076 if districtW5 == 10939
replace GB15_enepW5 = 2.722116 if districtW5 == 10940
replace GB15_enepW5 = 2.803074 if districtW5 == 10941
replace GB15_enepW5 = 2.422084 if districtW5 == 10942
replace GB15_enepW5 = 2.775167 if districtW5 == 10943
replace GB15_enepW5 = 2.919613 if districtW5 == 10944
replace GB15_enepW5 = 2.402272 if districtW5 == 10945
replace GB15_enepW5 = 2.858342 if districtW5 == 10946
replace GB15_enepW5 = 2.858625 if districtW5 == 10947
replace GB15_enepW5 = 3.246504 if districtW5 == 10948
replace GB15_enepW5 = 2.689791 if districtW5 == 10949
replace GB15_enepW5 = 2.654049 if districtW5 == 10950
replace GB15_enepW5 = 2.654553 if districtW5 == 10951
replace GB15_enepW5 = 2.883381 if districtW5 == 10952
replace GB15_enepW5 = 2.555134 if districtW5 == 10953
replace GB15_enepW5 = 2.935578 if districtW5 == 10954
replace GB15_enepW5 = 3.041299 if districtW5 == 10955
replace GB15_enepW5 = 3.347205 if districtW5 == 10956
replace GB15_enepW5 = 3.09288 if districtW5 == 10957
replace GB15_enepW5 = 4.157542 if districtW5 == 10958
replace GB15_enepW5 = 3.027745 if districtW5 == 10959
replace GB15_enepW5 = 3.189627 if districtW5 == 10960
replace GB15_enepW5 = 3.817502 if districtW5 == 10961
replace GB15_enepW5 = 2.56418 if districtW5 == 10962
replace GB15_enepW5 = 2.450651 if districtW5 == 10963
replace GB15_enepW5 = 3.529716 if districtW5 == 10964
replace GB15_enepW5 = 2.929984 if districtW5 == 10965
replace GB15_enepW5 = 2.782166 if districtW5 == 10966
replace GB15_enepW5 = 3.099694 if districtW5 == 10967
replace GB15_enepW5 = 2.960621 if districtW5 == 10968
replace GB15_enepW5 = 2.996721 if districtW5 == 10969
replace GB15_enepW5 = 2.801714 if districtW5 == 10970
replace GB15_enepW5 = 2.71688 if districtW5 == 10971
replace GB15_enepW5 = 3.781488 if districtW5 == 10972
replace GB15_enepW5 = 3.363783 if districtW5 == 10973
replace GB15_enepW5 = 3.255561 if districtW5 == 10974
replace GB15_enepW5 = 2.704068 if districtW5 == 10975
replace GB15_enepW5 = 2.928968 if districtW5 == 10976
replace GB15_enepW5 = 2.611244 if districtW5 == 10977
replace GB15_enepW5 = 2.768889 if districtW5 == 10978
replace GB15_enepW5 = 2.674897 if districtW5 == 10979
replace GB15_enepW5 = 2.769141 if districtW5 == 10980
replace GB15_enepW5 = 2.967681 if districtW5 == 10981
replace GB15_enepW5 = 2.892036 if districtW5 == 10982
replace GB15_enepW5 = 2.490461 if districtW5 == 10983
replace GB15_enepW5 = 3.222126 if districtW5 == 10984
replace GB15_enepW5 = 2.677015 if districtW5 == 10985
replace GB15_enepW5 = 2.823877 if districtW5 == 10986
replace GB15_enepW5 = 2.515925 if districtW5 == 10987
replace GB15_enepW5 = 3.290645 if districtW5 == 10988
replace GB15_enepW5 = 3.000815 if districtW5 == 10989
replace GB15_enepW5 = 2.805479 if districtW5 == 10990
replace GB15_enepW5 = 2.651192 if districtW5 == 10991
replace GB15_enepW5 = 2.891946 if districtW5 == 10992
replace GB15_enepW5 = 2.99773 if districtW5 == 10993
replace GB15_enepW5 = 3.028874 if districtW5 == 10994
replace GB15_enepW5 = 3.120763 if districtW5 == 10995
replace GB15_enepW5 = 2.858393 if districtW5 == 10996
replace GB15_enepW5 = 2.48302 if districtW5 == 10997
replace GB15_enepW5 = 2.486063 if districtW5 == 10998
replace GB15_enepW5 = 3.258775 if districtW5 == 10999
replace GB15_enepW5 = 3.069138 if districtW5 == 11000
replace GB15_enepW5 = 2.967526 if districtW5 == 11001
replace GB15_enepW5 = 2.08273 if districtW5 == 11002
replace GB15_enepW5 = 3.753735 if districtW5 == 11003
replace GB15_enepW5 = 2.561783 if districtW5 == 11004
replace GB15_enepW5 = 3.013188 if districtW5 == 11005
replace GB15_enepW5 = 2.798441 if districtW5 == 11006
replace GB15_enepW5 = 2.89511 if districtW5 == 11007
replace GB15_enepW5 = 2.667157 if districtW5 == 11008
replace GB15_enepW5 = 3.181858 if districtW5 == 11009
replace GB15_enepW5 = 2.32149 if districtW5 == 11010
replace GB15_enepW5 = 3.167256 if districtW5 == 11011
replace GB15_enepW5 = 2.81051 if districtW5 == 11012
replace GB15_enepW5 = 1.994833 if districtW5 == 11013
replace GB15_enepW5 = 2.976874 if districtW5 == 11014
replace GB15_enepW5 = 2.897216 if districtW5 == 11015
replace GB15_enepW5 = 2.468752 if districtW5 == 11016
replace GB15_enepW5 = 2.943496 if districtW5 == 11017
replace GB15_enepW5 = 2.823026 if districtW5 == 11018
replace GB15_enepW5 = 2.759693 if districtW5 == 11019
replace GB15_enepW5 = 2.645475 if districtW5 == 11020
replace GB15_enepW5 = 3.341131 if districtW5 == 11021
replace GB15_enepW5 = 2.903914 if districtW5 == 11022
replace GB15_enepW5 = 2.652168 if districtW5 == 11023
replace GB15_enepW5 = 2.710622 if districtW5 == 11024
replace GB15_enepW5 = 2.844819 if districtW5 == 11025
replace GB15_enepW5 = 2.974055 if districtW5 == 11026
replace GB15_enepW5 = 2.905807 if districtW5 == 11027
replace GB15_enepW5 = 2.448525 if districtW5 == 11028
replace GB15_enepW5 = 2.780212 if districtW5 == 11029
replace GB15_enepW5 = 2.895723 if districtW5 == 11030
replace GB15_enepW5 = 3.055033 if districtW5 == 11031
replace GB15_enepW5 = 1.995485 if districtW5 == 11032
replace GB15_enepW5 = 2.743275 if districtW5 == 11033
replace GB15_enepW5 = 2.826815 if districtW5 == 11034
replace GB15_enepW5 = 2.727213 if districtW5 == 11035
replace GB15_enepW5 = 2.511614 if districtW5 == 11036
replace GB15_enepW5 = 2.607501 if districtW5 == 11037
replace GB15_enepW5 = 3.241944 if districtW5 == 11038
replace GB15_enepW5 = 2.818462 if districtW5 == 11039
replace GB15_enepW5 = 2.781855 if districtW5 == 11040
replace GB15_enepW5 = 2.652687 if districtW5 == 11041
replace GB15_enepW5 = 2.280353 if districtW5 == 11042
replace GB15_enepW5 = 2.628657 if districtW5 == 11043
replace GB15_enepW5 = 2.47298 if districtW5 == 11044
replace GB15_enepW5 = 2.583333 if districtW5 == 11045
replace GB15_enepW5 = 2.454303 if districtW5 == 11046
replace GB15_enepW5 = 2.704251 if districtW5 == 11047
replace GB15_enepW5 = 2.605511 if districtW5 == 11048
replace GB15_enepW5 = 2.942324 if districtW5 == 11049
replace GB15_enepW5 = 2.657359 if districtW5 == 11050
replace GB15_enepW5 = 2.708455 if districtW5 == 11051
replace GB15_enepW5 = 2.941199 if districtW5 == 11052
replace GB15_enepW5 = 3.211444 if districtW5 == 11053
replace GB15_enepW5 = 3.111861 if districtW5 == 11054
replace GB15_enepW5 = 2.995207 if districtW5 == 11055
replace GB15_enepW5 = 2.969303 if districtW5 == 11056
replace GB15_enepW5 = 2.734235 if districtW5 == 11057
replace GB15_enepW5 = 3.440727 if districtW5 == 11058
replace GB15_enepW5 = 2.918598 if districtW5 == 11059
replace GB15_enepW5 = 3.177335 if districtW5 == 11060
replace GB15_enepW5 = 3.490355 if districtW5 == 11061
replace GB15_enepW5 = 3.050053 if districtW5 == 11062
replace GB15_enepW5 = 2.334552 if districtW5 == 40001
replace GB15_enepW5 = 2.864797 if districtW5 == 40002
replace GB15_enepW5 = 5.788406 if districtW5 == 40003
replace GB15_enepW5 = 2.86448 if districtW5 == 40004
replace GB15_enepW5 = 4.737517 if districtW5 == 40005
replace GB15_enepW5 = 3.811772 if districtW5 == 40006
replace GB15_enepW5 = 2.355271 if districtW5 == 40007
replace GB15_enepW5 = 2.886081 if districtW5 == 40008
replace GB15_enepW5 = 3.539254 if districtW5 == 40009
replace GB15_enepW5 = 3.363138 if districtW5 == 40010
replace GB15_enepW5 = 2.992864 if districtW5 == 40011
replace GB15_enepW5 = 4.001147 if districtW5 == 40012
replace GB15_enepW5 = 3.200016 if districtW5 == 40013
replace GB15_enepW5 = 4.288079 if districtW5 == 40014
replace GB15_enepW5 = 3.538909 if districtW5 == 40015
replace GB15_enepW5 = 3.953801 if districtW5 == 40016
replace GB15_enepW5 = 3.930045 if districtW5 == 40017
replace GB15_enepW5 = 3.653405 if districtW5 == 40018
replace GB15_enepW5 = 2.484403 if districtW5 == 20001
replace GB15_enepW5 = 3.332196 if districtW5 == 20002
replace GB15_enepW5 = 2.415369 if districtW5 == 20003
replace GB15_enepW5 = 2.575802 if districtW5 == 20004
replace GB15_enepW5 = 3.252698 if districtW5 == 20005
replace GB15_enepW5 = 2.833907 if districtW5 == 20006
replace GB15_enepW5 = 2.212734 if districtW5 == 20007
replace GB15_enepW5 = 3.314423 if districtW5 == 20008
replace GB15_enepW5 = 2.85009 if districtW5 == 20009
replace GB15_enepW5 = 2.610569 if districtW5 == 20010
replace GB15_enepW5 = 2.272925 if districtW5 == 20011
replace GB15_enepW5 = 2.195965 if districtW5 == 20012
replace GB15_enepW5 = 3.098379 if districtW5 == 20013
replace GB15_enepW5 = 3.041423 if districtW5 == 20014
replace GB15_enepW5 = 2.382902 if districtW5 == 20015
replace GB15_enepW5 = 2.231053 if districtW5 == 20016
replace GB15_enepW5 = 2.705646 if districtW5 == 20017
replace GB15_enepW5 = 3.155754 if districtW5 == 20018
replace GB15_enepW5 = 2.473215 if districtW5 == 20019
replace GB15_enepW5 = 3.15771 if districtW5 == 20020
replace GB15_enepW5 = 3.038411 if districtW5 == 20021
replace GB15_enepW5 = 2.886224 if districtW5 == 20022
replace GB15_enepW5 = 3.370319 if districtW5 == 20023
replace GB15_enepW5 = 3.317815 if districtW5 == 20024
replace GB15_enepW5 = 3.303192 if districtW5 == 20025
replace GB15_enepW5 = 3.435289 if districtW5 == 20026
replace GB15_enepW5 = 2.576265 if districtW5 == 20027
replace GB15_enepW5 = 2.426279 if districtW5 == 20028
replace GB15_enepW5 = 2.556553 if districtW5 == 20029
replace GB15_enepW5 = 2.312431 if districtW5 == 20030
replace GB15_enepW5 = 2.694706 if districtW5 == 20031
replace GB15_enepW5 = 2.20721 if districtW5 == 20032
replace GB15_enepW5 = 2.492724 if districtW5 == 20033
replace GB15_enepW5 = 2.496854 if districtW5 == 20034
replace GB15_enepW5 = 2.28412 if districtW5 == 20035
replace GB15_enepW5 = 2.186123 if districtW5 == 20036
replace GB15_enepW5 = 2.842826 if districtW5 == 20037
replace GB15_enepW5 = 2.4601 if districtW5 == 20038
replace GB15_enepW5 = 2.788209 if districtW5 == 20039
replace GB15_enepW5 = 2.393499 if districtW5 == 20040
replace GB15_enepW5 = 2.531497 if districtW5 == 20041
replace GB15_enepW5 = 2.793774 if districtW5 == 20042
replace GB15_enepW5 = 2.612959 if districtW5 == 20043
replace GB15_enepW5 = 2.427917 if districtW5 == 20044
replace GB15_enepW5 = 2.753754 if districtW5 == 20045
replace GB15_enepW5 = 2.821377 if districtW5 == 20046
replace GB15_enepW5 = 2.336027 if districtW5 == 20047
replace GB15_enepW5 = 2.606494 if districtW5 == 20048
replace GB15_enepW5 = 3.344232 if districtW5 == 20049
replace GB15_enepW5 = 2.971796 if districtW5 == 20050
replace GB15_enepW5 = 3.035235 if districtW5 == 20051
replace GB15_enepW5 = 2.629501 if districtW5 == 20052
replace GB15_enepW5 = 2.408631 if districtW5 == 20053
replace GB15_enepW5 = 2.693521 if districtW5 == 20054
replace GB15_enepW5 = 2.721501 if districtW5 == 20055
replace GB15_enepW5 = 2.45726 if districtW5 == 20056
replace GB15_enepW5 = 3.045974 if districtW5 == 20057
replace GB15_enepW5 = 3.284745 if districtW5 == 20058
replace GB15_enepW5 = 2.211492 if districtW5 == 20059
replace GB15_enepW5 = 3.898479 if districtW5 == 30041
replace GB15_enepW5 = 3.306537 if districtW5 == 30042
replace GB15_enepW5 = 3.366684 if districtW5 == 30043
replace GB15_enepW5 = 3.679038 if districtW5 == 30044
replace GB15_enepW5 = 3.684336 if districtW5 == 30045
replace GB15_enepW5 = 3.396335 if districtW5 == 30046
replace GB15_enepW5 = 3.769637 if districtW5 == 30047
replace GB15_enepW5 = 2.889722 if districtW5 == 30048
replace GB15_enepW5 = 3.383662 if districtW5 == 30049
replace GB15_enepW5 = 3.760677 if districtW5 == 30050
replace GB15_enepW5 = 2.970621 if districtW5 == 30051
replace GB15_enepW5 = 2.852182 if districtW5 == 30052
replace GB15_enepW5 = 3.40194 if districtW5 == 30053
replace GB15_enepW5 = 2.962665 if districtW5 == 30054
replace GB15_enepW5 = 3.5684 if districtW5 == 30055
replace GB15_enepW5 = 3.300743 if districtW5 == 30056
replace GB15_enepW5 = 3.226293 if districtW5 == 30057
replace GB15_enepW5 = 3.549702 if districtW5 == 30058
replace GB15_enepW5 = 3.487929 if districtW5 == 30059
replace GB15_enepW5 = 3.106982 if districtW5 == 30060
replace GB15_enepW5 = 3.950041 if districtW5 == 30061
replace GB15_enepW5 = 3.731118 if districtW5 == 30062
replace GB15_enepW5 = 3.244651 if districtW5 == 30063
replace GB15_enepW5 = 4.165496 if districtW5 == 30064
replace GB15_enepW5 = 3.740136 if districtW5 == 30065
replace GB15_enepW5 = 3.343867 if districtW5 == 30066
replace GB15_enepW5 = 3.778436 if districtW5 == 30067
replace GB15_enepW5 = 3.566676 if districtW5 == 30068
replace GB15_enepW5 = 3.608055 if districtW5 == 30069
replace GB15_enepW5 = 3.348032 if districtW5 == 30070
replace GB15_enepW5 = 2.888039 if districtW5 == 30071
replace GB15_enepW5 = 2.568687 if districtW5 == 30072
replace GB15_enepW5 = 3.691674 if districtW5 == 30073
replace GB15_enepW5 = 2.932935 if districtW5 == 30074
replace GB15_enepW5 = 4.04245 if districtW5 == 30075
replace GB15_enepW5 = 3.519851 if districtW5 == 30076
replace GB15_enepW5 = 3.187399 if districtW5 == 30077
replace GB15_enepW5 = 2.995445 if districtW5 == 30078
replace GB15_enepW5 = 3.783493 if districtW5 == 30079
replace GB15_enepW5 = 3.53074 if districtW5 == 30080


********************************************
** COMPETITIVENESS: 2017 GENERAL ELECTION **
********************************************

* Margin of victory

gen GB17_marginW11 = .

replace GB17_marginW11 = 23.4382 if districtW11 == 10530
replace GB17_marginW11 = 35.55859 if districtW11 == 10531
replace GB17_marginW11 = 12.17276 if districtW11 == 10532
replace GB17_marginW11 = 18.11792 if districtW11 == 10533
replace GB17_marginW11 = 39.63588 if districtW11 == 10534
replace GB17_marginW11 = .8821249 if districtW11 == 10535
replace GB17_marginW11 = 29.18887 if districtW11 == 10536
replace GB17_marginW11 = 28.39866 if districtW11 == 10537
replace GB17_marginW11 = 24.93237 if districtW11 == 10538
replace GB17_marginW11 = 20.14067 if districtW11 == 10539
replace GB17_marginW11 = 45.31974 if districtW11 == 10540
replace GB17_marginW11 = 39.77282 if districtW11 == 10541
replace GB17_marginW11 = 32.57553 if districtW11 == 10542
replace GB17_marginW11 = .439167 if districtW11 == 10543
replace GB17_marginW11 = 29.83214 if districtW11 == 10544
replace GB17_marginW11 = 16.91565 if districtW11 == 10545
replace GB17_marginW11 = 9.286126 if districtW11 == 10546
replace GB17_marginW11 = 11.48377 if districtW11 == 10547
replace GB17_marginW11 = 16.66233 if districtW11 == 10548
replace GB17_marginW11 = 4.3881 if districtW11 == 10549
replace GB17_marginW11 = 43.80488 if districtW11 == 10550
replace GB17_marginW11 = 29.22139 if districtW11 == 10551
replace GB17_marginW11 = 1.627475 if districtW11 == 10552
replace GB17_marginW11 = 22.1664 if districtW11 == 10553
replace GB17_marginW11 = 27.90913 if districtW11 == 10554
replace GB17_marginW11 = 59.16089 if districtW11 == 10555
replace GB17_marginW11 = 25.23814 if districtW11 == 10556
replace GB17_marginW11 = 37.26964 if districtW11 == 10557
replace GB17_marginW11 = 20.0779 if districtW11 == 10558
replace GB17_marginW11 = 58.43391 if districtW11 == 10559
replace GB17_marginW11 = 15.86032 if districtW11 == 10560
replace GB17_marginW11 = 19.57439 if districtW11 == 10561
replace GB17_marginW11 = 62.50046 if districtW11 == 10562
replace GB17_marginW11 = 66.87502 if districtW11 == 10563
replace GB17_marginW11 = 69.51364 if districtW11 == 10564
replace GB17_marginW11 = 10.52358 if districtW11 == 10565
replace GB17_marginW11 = 41.59332 if districtW11 == 10566
replace GB17_marginW11 = 31.0442 if districtW11 == 10567
replace GB17_marginW11 = 37.24327 if districtW11 == 10568
replace GB17_marginW11 = 1.159862 if districtW11 == 10569
replace GB17_marginW11 = 42.86646 if districtW11 == 10570
replace GB17_marginW11 = 48.86446 if districtW11 == 10571
replace GB17_marginW11 = 4.933304 if districtW11 == 10572
replace GB17_marginW11 = 7.218263 if districtW11 == 10573
replace GB17_marginW11 = 28.02804 if districtW11 == 10574
replace GB17_marginW11 = 18.62791 if districtW11 == 10575
replace GB17_marginW11 = 34.06683 if districtW11 == 10576
replace GB17_marginW11 = 11.3674 if districtW11 == 10577
replace GB17_marginW11 = 8.403605 if districtW11 == 10578
replace GB17_marginW11 = 31.01387 if districtW11 == 10579
replace GB17_marginW11 = 1.833352 if districtW11 == 10580
replace GB17_marginW11 = 71.98537 if districtW11 == 10581
replace GB17_marginW11 = 38.64829 if districtW11 == 10582
replace GB17_marginW11 = 32.67163 if districtW11 == 10583
replace GB17_marginW11 = 16.32523 if districtW11 == 10584
replace GB17_marginW11 = 17.32536 if districtW11 == 10585
replace GB17_marginW11 = 28.65526 if districtW11 == 10586
replace GB17_marginW11 = 45.02214 if districtW11 == 10587
replace GB17_marginW11 = 16.32196 if districtW11 == 10588
replace GB17_marginW11 = 48.10666 if districtW11 == 10589
replace GB17_marginW11 = 35.2062 if districtW11 == 10590
replace GB17_marginW11 = 53.53564 if districtW11 == 10591
replace GB17_marginW11 = 30.22642 if districtW11 == 10592
replace GB17_marginW11 = 19.76667 if districtW11 == 10593
replace GB17_marginW11 = 45.36383 if districtW11 == 10594
replace GB17_marginW11 = 26.51244 if districtW11 == 10595
replace GB17_marginW11 = 27.43858 if districtW11 == 10596
replace GB17_marginW11 = 20.05406 if districtW11 == 10597
replace GB17_marginW11 = 25.48061 if districtW11 == 10598
replace GB17_marginW11 = 26.36666 if districtW11 == 10599
replace GB17_marginW11 = 8.801023 if districtW11 == 10600
replace GB17_marginW11 = 29.3976 if districtW11 == 10601
replace GB17_marginW11 = 52.13943 if districtW11 == 10602
replace GB17_marginW11 = 28.25749 if districtW11 == 10603
replace GB17_marginW11 = 20.55205 if districtW11 == 10604
replace GB17_marginW11 = 30.66803 if districtW11 == 10605
replace GB17_marginW11 = 33.25682 if districtW11 == 10606
replace GB17_marginW11 = 1.554731 if districtW11 == 10607
replace GB17_marginW11 = 48.8335 if districtW11 == 10608
replace GB17_marginW11 = 15.76818 if districtW11 == 10609
replace GB17_marginW11 = 20.12983 if districtW11 == 10610
replace GB17_marginW11 = 9.133041 if districtW11 == 10611
replace GB17_marginW11 = 11.69837 if districtW11 == 10612
replace GB17_marginW11 = 29.66699 if districtW11 == 10613
replace GB17_marginW11 = 1.049024 if districtW11 == 10614
replace GB17_marginW11 = 64.99686 if districtW11 == 10615
replace GB17_marginW11 = 3.2545 if districtW11 == 10616
replace GB17_marginW11 = 22.63561 if districtW11 == 10617
replace GB17_marginW11 = 17.52799 if districtW11 == 10618
replace GB17_marginW11 = .3292233 if districtW11 == 10619
replace GB17_marginW11 = 6.036324 if districtW11 == 10620
replace GB17_marginW11 = 2.697378 if districtW11 == 10621
replace GB17_marginW11 = 42.2098 if districtW11 == 10622
replace GB17_marginW11 = 27.10739 if districtW11 == 10623
replace GB17_marginW11 = 30.40302 if districtW11 == 10624
replace GB17_marginW11 = 29.61613 if districtW11 == 10625
replace GB17_marginW11 = 23.29695 if districtW11 == 10626
replace GB17_marginW11 = 8.258814 if districtW11 == 10627
replace GB17_marginW11 = 23.86915 if districtW11 == 10628
replace GB17_marginW11 = 19.436 if districtW11 == 10629
replace GB17_marginW11 = 4.506069 if districtW11 == 10630
replace GB17_marginW11 = 40.07095 if districtW11 == 10631
replace GB17_marginW11 = 20.0409 if districtW11 == 10632
replace GB17_marginW11 = 37.75326 if districtW11 == 10633
replace GB17_marginW11 = 5.191544 if districtW11 == 10634
replace GB17_marginW11 = 29.10395 if districtW11 == 10635
replace GB17_marginW11 = .6369203 if districtW11 == 10636
replace GB17_marginW11 = 13.50253 if districtW11 == 10637
replace GB17_marginW11 = 49.71165 if districtW11 == 10638
replace GB17_marginW11 = 8.144048 if districtW11 == 10639
replace GB17_marginW11 = 16.26345 if districtW11 == 10640
replace GB17_marginW11 = 25.58563 if districtW11 == 10641
replace GB17_marginW11 = 35.85457 if districtW11 == 10642
replace GB17_marginW11 = 21.73731 if districtW11 == 10643
replace GB17_marginW11 = 10.60229 if districtW11 == 10644
replace GB17_marginW11 = 1.514402 if districtW11 == 10645
replace GB17_marginW11 = 22.44136 if districtW11 == 10646
replace GB17_marginW11 = 3.948563 if districtW11 == 10647
replace GB17_marginW11 = 4.483557 if districtW11 == 10648
replace GB17_marginW11 = 33.49961 if districtW11 == 10649
replace GB17_marginW11 = 17.21198 if districtW11 == 10650
replace GB17_marginW11 = 16.90528 if districtW11 == 10651
replace GB17_marginW11 = 4.887319 if districtW11 == 10652
replace GB17_marginW11 = .0872314 if districtW11 == 10653
replace GB17_marginW11 = 9.899986 if districtW11 == 10654
replace GB17_marginW11 = 54.28275 if districtW11 == 10655
replace GB17_marginW11 = 18.61991 if districtW11 == 10656
replace GB17_marginW11 = 10.14768 if districtW11 == 10657
replace GB17_marginW11 = 7.318649 if districtW11 == 10658
replace GB17_marginW11 = 24.31765 if districtW11 == 10659
replace GB17_marginW11 = 39.04569 if districtW11 == 10660
replace GB17_marginW11 = 35.54887 if districtW11 == 10661
replace GB17_marginW11 = 4.139957 if districtW11 == 10662
replace GB17_marginW11 = 24.82673 if districtW11 == 10663
replace GB17_marginW11 = 28.90198 if districtW11 == 10664
replace GB17_marginW11 = 41.77654 if districtW11 == 10665
replace GB17_marginW11 = 5.873198 if districtW11 == 10666
replace GB17_marginW11 = 11.23989 if districtW11 == 10667
replace GB17_marginW11 = 23.54732 if districtW11 == 10668
replace GB17_marginW11 = 33.14426 if districtW11 == 10669
replace GB17_marginW11 = 12.38695 if districtW11 == 10670
replace GB17_marginW11 = .056538 if districtW11 == 10671
replace GB17_marginW11 = 20.21232 if districtW11 == 10672
replace GB17_marginW11 = 50.15051 if districtW11 == 10673
replace GB17_marginW11 = 24.9485 if districtW11 == 10674
replace GB17_marginW11 = 37.49905 if districtW11 == 10675
replace GB17_marginW11 = 48.93122 if districtW11 == 10676
replace GB17_marginW11 = 40.95259 if districtW11 == 10677
replace GB17_marginW11 = 13.3086 if districtW11 == 10678
replace GB17_marginW11 = 70.42361 if districtW11 == 10679
replace GB17_marginW11 = 46.65752 if districtW11 == 10680
replace GB17_marginW11 = 40.39322 if districtW11 == 10681
replace GB17_marginW11 = 9.612742 if districtW11 == 10682
replace GB17_marginW11 = 27.81155 if districtW11 == 10683
replace GB17_marginW11 = 2.80216 if districtW11 == 10684
replace GB17_marginW11 = 24.75384 if districtW11 == 10685
replace GB17_marginW11 = 23.27013 if districtW11 == 10686
replace GB17_marginW11 = 48.34241 if districtW11 == 10687
replace GB17_marginW11 = 22.36008 if districtW11 == 10688
replace GB17_marginW11 = 16.46737 if districtW11 == 10689
replace GB17_marginW11 = 13.64099 if districtW11 == 10690
replace GB17_marginW11 = 21.09956 if districtW11 == 10691
replace GB17_marginW11 = 9.011337 if districtW11 == 10692
replace GB17_marginW11 = 35.92627 if districtW11 == 10693
replace GB17_marginW11 = 34.54763 if districtW11 == 10694
replace GB17_marginW11 = 9.107894 if districtW11 == 10695
replace GB17_marginW11 = 22.52159 if districtW11 == 10696
replace GB17_marginW11 = 38.93253 if districtW11 == 10697
replace GB17_marginW11 = 29.07999 if districtW11 == 10698
replace GB17_marginW11 = 37.8065 if districtW11 == 10699
replace GB17_marginW11 = 35.00171 if districtW11 == 10700
replace GB17_marginW11 = 29.42463 if districtW11 == 10701
replace GB17_marginW11 = 8.263972 if districtW11 == 10702
replace GB17_marginW11 = 3.163117 if districtW11 == 10703
replace GB17_marginW11 = 26.17579 if districtW11 == 10704
replace GB17_marginW11 = 18.35532 if districtW11 == 10705
replace GB17_marginW11 = 25.40512 if districtW11 == 10706
replace GB17_marginW11 = 33.10258 if districtW11 == 10707
replace GB17_marginW11 = 60.06689 if districtW11 == 10708
replace GB17_marginW11 = 41.20847 if districtW11 == 10709
replace GB17_marginW11 = 9.082466 if districtW11 == 10710
replace GB17_marginW11 = 19.29688 if districtW11 == 10711
replace GB17_marginW11 = 10.2088 if districtW11 == 10712
replace GB17_marginW11 = 34.78305 if districtW11 == 10713
replace GB17_marginW11 = 35.50616 if districtW11 == 10714
replace GB17_marginW11 = 19.07668 if districtW11 == 10715
replace GB17_marginW11 = 7.221082 if districtW11 == 10716
replace GB17_marginW11 = 18.06053 if districtW11 == 10717
replace GB17_marginW11 = 39.005 if districtW11 == 10718
replace GB17_marginW11 = 30.69773 if districtW11 == 10719
replace GB17_marginW11 = 62.41607 if districtW11 == 10720
replace GB17_marginW11 = 68.52441 if districtW11 == 10721
replace GB17_marginW11 = 11.83668 if districtW11 == 10722
replace GB17_marginW11 = 11.13597 if districtW11 == 10723
replace GB17_marginW11 = 29.94751 if districtW11 == 10724
replace GB17_marginW11 = 51.30458 if districtW11 == 10725
replace GB17_marginW11 = 35.69433 if districtW11 == 10726
replace GB17_marginW11 = 26.64064 if districtW11 == 10727
replace GB17_marginW11 = 21.57887 if districtW11 == 10728
replace GB17_marginW11 = 15.6781 if districtW11 == 10729
replace GB17_marginW11 = 32.01974 if districtW11 == 10730
replace GB17_marginW11 = 3.4556 if districtW11 == 10731
replace GB17_marginW11 = 26.44028 if districtW11 == 10732
replace GB17_marginW11 = 18.28612 if districtW11 == 10733
replace GB17_marginW11 = 28.07141 if districtW11 == 10734
replace GB17_marginW11 = .6317794 if districtW11 == 10735
replace GB17_marginW11 = 34.45179 if districtW11 == 10736
replace GB17_marginW11 = 37.8959 if districtW11 == 10737
replace GB17_marginW11 = 12.49433 if districtW11 == 10738
replace GB17_marginW11 = 18.06549 if districtW11 == 10739
replace GB17_marginW11 = 22.14435 if districtW11 == 10740
replace GB17_marginW11 = 2.053049 if districtW11 == 10741
replace GB17_marginW11 = 39.04446 if districtW11 == 10742
replace GB17_marginW11 = 29.73814 if districtW11 == 10743
replace GB17_marginW11 = 31.72923 if districtW11 == 10744
replace GB17_marginW11 = 32.44024 if districtW11 == 10745
replace GB17_marginW11 = 19.98096 if districtW11 == 10746
replace GB17_marginW11 = 15.27524 if districtW11 == 10747
replace GB17_marginW11 = 4.311738 if districtW11 == 10748
replace GB17_marginW11 = 20.4668 if districtW11 == 10749
replace GB17_marginW11 = 51.7128 if districtW11 == 10750
replace GB17_marginW11 = 31.6228 if districtW11 == 10751
replace GB17_marginW11 = 49.34423 if districtW11 == 10752
replace GB17_marginW11 = 37.88536 if districtW11 == 10753
replace GB17_marginW11 = 29.75169 if districtW11 == 10754
replace GB17_marginW11 = 32.5665 if districtW11 == 10755
replace GB17_marginW11 = 27.38742 if districtW11 == 10756
replace GB17_marginW11 = 24.23811 if districtW11 == 10757
replace GB17_marginW11 = 12.86447 if districtW11 == 10758
replace GB17_marginW11 = 18.20706 if districtW11 == 10759
replace GB17_marginW11 = 54.88839 if districtW11 == 10760
replace GB17_marginW11 = 1.625046 if districtW11 == 10761
replace GB17_marginW11 = 28.28851 if districtW11 == 10762
replace GB17_marginW11 = 60.47007 if districtW11 == 10763
replace GB17_marginW11 = 42.17153 if districtW11 == 10764
replace GB17_marginW11 = 40.12505 if districtW11 == 10765
replace GB17_marginW11 = .4621565 if districtW11 == 10766
replace GB17_marginW11 = 35.22145 if districtW11 == 10767
replace GB17_marginW11 = .05171 if districtW11 == 10768
replace GB17_marginW11 = 21.37884 if districtW11 == 10769
replace GB17_marginW11 = 6.632572 if districtW11 == 10770
replace GB17_marginW11 = 28.37491 if districtW11 == 10771
replace GB17_marginW11 = 38.5809 if districtW11 == 10772
replace GB17_marginW11 = 23.21713 if districtW11 == 10773
replace GB17_marginW11 = 15.38745 if districtW11 == 10774
replace GB17_marginW11 = 76.08456 if districtW11 == 10775
replace GB17_marginW11 = 14.4839 if districtW11 == 10776
replace GB17_marginW11 = 49.70948 if districtW11 == 10777
replace GB17_marginW11 = 30.77146 if districtW11 == 10778
replace GB17_marginW11 = 32.05909 if districtW11 == 10779
replace GB17_marginW11 = 9.12567 if districtW11 == 10780
replace GB17_marginW11 = 37.80577 if districtW11 == 10781
replace GB17_marginW11 = 42.78193 if districtW11 == 10782
replace GB17_marginW11 = 51.98448 if districtW11 == 10783
replace GB17_marginW11 = 29.4839 if districtW11 == 10784
replace GB17_marginW11 = 20.3823 if districtW11 == 10785
replace GB17_marginW11 = 10.16386 if districtW11 == 10786
replace GB17_marginW11 = 44.94185 if districtW11 == 10787
replace GB17_marginW11 = 43.54087 if districtW11 == 10788
replace GB17_marginW11 = 63.32378 if districtW11 == 10789
replace GB17_marginW11 = 48.96151 if districtW11 == 10790
replace GB17_marginW11 = 34.71527 if districtW11 == 10791
replace GB17_marginW11 = 3.156942 if districtW11 == 10792
replace GB17_marginW11 = 74.85839 if districtW11 == 10793
replace GB17_marginW11 = 77.14056 if districtW11 == 10794
replace GB17_marginW11 = 67.52062 if districtW11 == 10795
replace GB17_marginW11 = 72.86496 if districtW11 == 10796
replace GB17_marginW11 = 7.883948 if districtW11 == 10797
replace GB17_marginW11 = 37.2193 if districtW11 == 10798
replace GB17_marginW11 = 38.59516 if districtW11 == 10799
replace GB17_marginW11 = 30.80949 if districtW11 == 10800
replace GB17_marginW11 = 30.18447 if districtW11 == 10801
replace GB17_marginW11 = 15.85063 if districtW11 == 10802
replace GB17_marginW11 = 45.42832 if districtW11 == 10803
replace GB17_marginW11 = 34.2692 if districtW11 == 10804
replace GB17_marginW11 = 28.8539 if districtW11 == 10805
replace GB17_marginW11 = 46.67145 if districtW11 == 10806
replace GB17_marginW11 = 63.24417 if districtW11 == 10807
replace GB17_marginW11 = 69.04881 if districtW11 == 10808
replace GB17_marginW11 = 55.73486 if districtW11 == 10809
replace GB17_marginW11 = 2.107385 if districtW11 == 10810
replace GB17_marginW11 = 47.40921 if districtW11 == 10811
replace GB17_marginW11 = 35.1335 if districtW11 == 10812
replace GB17_marginW11 = 33.23355 if districtW11 == 10813
replace GB17_marginW11 = 23.06089 if districtW11 == 10814
replace GB17_marginW11 = 31.78804 if districtW11 == 10815
replace GB17_marginW11 = 28.89631 if districtW11 == 10816
replace GB17_marginW11 = 31.9201 if districtW11 == 10817
replace GB17_marginW11 = 42.34239 if districtW11 == 10818
replace GB17_marginW11 = 38.92864 if districtW11 == 10819
replace GB17_marginW11 = 2.141958 if districtW11 == 10820
replace GB17_marginW11 = 3.089604 if districtW11 == 10821
replace GB17_marginW11 = 2.579555 if districtW11 == 10822
replace GB17_marginW11 = 44.42204 if districtW11 == 10823
replace GB17_marginW11 = 42.55015 if districtW11 == 10824
replace GB17_marginW11 = 3.064153 if districtW11 == 10825
replace GB17_marginW11 = 4.018566 if districtW11 == 10826
replace GB17_marginW11 = 42.82016 if districtW11 == 10827
replace GB17_marginW11 = 47.21422 if districtW11 == 10828
replace GB17_marginW11 = 32.973 if districtW11 == 10829
replace GB17_marginW11 = 40.06639 if districtW11 == 10830
replace GB17_marginW11 = 40.26797 if districtW11 == 10831
replace GB17_marginW11 = 46.25934 if districtW11 == 10832
replace GB17_marginW11 = 21.43182 if districtW11 == 10833
replace GB17_marginW11 = .0684291 if districtW11 == 10834
replace GB17_marginW11 = 33.23198 if districtW11 == 10835
replace GB17_marginW11 = 29.47491 if districtW11 == 10836
replace GB17_marginW11 = 14.13317 if districtW11 == 10837
replace GB17_marginW11 = 7.77668 if districtW11 == 10838
replace GB17_marginW11 = 46.25835 if districtW11 == 10839
replace GB17_marginW11 = 29.89326 if districtW11 == 10840
replace GB17_marginW11 = 32.48521 if districtW11 == 10841
replace GB17_marginW11 = 39.91817 if districtW11 == 10842
replace GB17_marginW11 = 5.676857 if districtW11 == 10843
replace GB17_marginW11 = 48.19268 if districtW11 == 10844
replace GB17_marginW11 = 30.28967 if districtW11 == 10845
replace GB17_marginW11 = 18.93863 if districtW11 == 10846
replace GB17_marginW11 = 43.0516 if districtW11 == 10847
replace GB17_marginW11 = 6.729517 if districtW11 == 10848
replace GB17_marginW11 = 29.41599 if districtW11 == 10849
replace GB17_marginW11 = 27.58816 if districtW11 == 10850
replace GB17_marginW11 = 15.17911 if districtW11 == 10851
replace GB17_marginW11 = 22.22038 if districtW11 == 10852
replace GB17_marginW11 = 37.1618 if districtW11 == 10853
replace GB17_marginW11 = 18.03807 if districtW11 == 10854
replace GB17_marginW11 = 28.14146 if districtW11 == 10855
replace GB17_marginW11 = 18.35414 if districtW11 == 10856
replace GB17_marginW11 = 38.5881 if districtW11 == 10857
replace GB17_marginW11 = 24.81463 if districtW11 == 10858
replace GB17_marginW11 = 28.24773 if districtW11 == 10859
replace GB17_marginW11 = 42.59673 if districtW11 == 10860
replace GB17_marginW11 = 1.998612 if districtW11 == 10861
replace GB17_marginW11 = 2.824488 if districtW11 == 10862
replace GB17_marginW11 = 1.104695 if districtW11 == 10863
replace GB17_marginW11 = 30.36663 if districtW11 == 10864
replace GB17_marginW11 = 49.8131 if districtW11 == 10865
replace GB17_marginW11 = 29.12394 if districtW11 == 10866
replace GB17_marginW11 = 31.50284 if districtW11 == 10867
replace GB17_marginW11 = 10.28719 if districtW11 == 10868
replace GB17_marginW11 = 32.19267 if districtW11 == 10869
replace GB17_marginW11 = 17.39482 if districtW11 == 10870
replace GB17_marginW11 = 37.56006 if districtW11 == 10871
replace GB17_marginW11 = 38.56642 if districtW11 == 10872
replace GB17_marginW11 = 43.20173 if districtW11 == 10873
replace GB17_marginW11 = 1.359549 if districtW11 == 10874
replace GB17_marginW11 = 2.851474 if districtW11 == 10875
replace GB17_marginW11 = 2.655313 if districtW11 == 10876
replace GB17_marginW11 = 34.23714 if districtW11 == 10877
replace GB17_marginW11 = 1.271525 if districtW11 == 10878
replace GB17_marginW11 = 11.05093 if districtW11 == 10879
replace GB17_marginW11 = 13.29285 if districtW11 == 10880
replace GB17_marginW11 = 28.50351 if districtW11 == 10881
replace GB17_marginW11 = 47.11803 if districtW11 == 10882
replace GB17_marginW11 = 21.10782 if districtW11 == 10883
replace GB17_marginW11 = 3.486961 if districtW11 == 10884
replace GB17_marginW11 = 44.16945 if districtW11 == 10885
replace GB17_marginW11 = .6134301 if districtW11 == 10886
replace GB17_marginW11 = 3.313857 if districtW11 == 10887
replace GB17_marginW11 = 42.38743 if districtW11 == 10888
replace GB17_marginW11 = 6.786993 if districtW11 == 10889
replace GB17_marginW11 = 5.55577 if districtW11 == 10890
replace GB17_marginW11 = 22.28618 if districtW11 == 10891
replace GB17_marginW11 = 16.28874 if districtW11 == 10892
replace GB17_marginW11 = 32.72578 if districtW11 == 10893
replace GB17_marginW11 = 23.91123 if districtW11 == 10894
replace GB17_marginW11 = 40.53111 if districtW11 == 10895
replace GB17_marginW11 = .0710577 if districtW11 == 10896
replace GB17_marginW11 = 29.61194 if districtW11 == 10897
replace GB17_marginW11 = 18.3191 if districtW11 == 10898
replace GB17_marginW11 = 11.7423 if districtW11 == 10899
replace GB17_marginW11 = 27.5869 if districtW11 == 10900
replace GB17_marginW11 = 35.99984 if districtW11 == 10901
replace GB17_marginW11 = 6.411996 if districtW11 == 10902
replace GB17_marginW11 = 7.844326 if districtW11 == 10903
replace GB17_marginW11 = 30.02663 if districtW11 == 10904
replace GB17_marginW11 = 15.99657 if districtW11 == 10905
replace GB17_marginW11 = 26.1886 if districtW11 == 10906
replace GB17_marginW11 = 34.97452 if districtW11 == 10907
replace GB17_marginW11 = 13.73669 if districtW11 == 10908
replace GB17_marginW11 = 40.13271 if districtW11 == 10909
replace GB17_marginW11 = 40.98767 if districtW11 == 10910
replace GB17_marginW11 = 40.17724 if districtW11 == 10911
replace GB17_marginW11 = 32.51299 if districtW11 == 10912
replace GB17_marginW11 = 6.808856 if districtW11 == 10913
replace GB17_marginW11 = 8.534402 if districtW11 == 10914
replace GB17_marginW11 = 14.56805 if districtW11 == 10915
replace GB17_marginW11 = 29.98906 if districtW11 == 10916
replace GB17_marginW11 = 24.55953 if districtW11 == 10917
replace GB17_marginW11 = 42.7916 if districtW11 == 10918
replace GB17_marginW11 = 57.95684 if districtW11 == 10919
replace GB17_marginW11 = 27.06212 if districtW11 == 10920
replace GB17_marginW11 = 45.72008 if districtW11 == 10921
replace GB17_marginW11 = 3.726763 if districtW11 == 10922
replace GB17_marginW11 = 31.26667 if districtW11 == 10923
replace GB17_marginW11 = 9.74065 if districtW11 == 10924
replace GB17_marginW11 = 8.766741 if districtW11 == 10925
replace GB17_marginW11 = 11.38601 if districtW11 == 10926
replace GB17_marginW11 = 29.59972 if districtW11 == 10927
replace GB17_marginW11 = 34.37511 if districtW11 == 10928
replace GB17_marginW11 = 38.35585 if districtW11 == 10929
replace GB17_marginW11 = 31.30675 if districtW11 == 10930
replace GB17_marginW11 = 36.24973 if districtW11 == 10931
replace GB17_marginW11 = 35.85112 if districtW11 == 10932
replace GB17_marginW11 = 24.38455 if districtW11 == 10933
replace GB17_marginW11 = 24.57026 if districtW11 == 10934
replace GB17_marginW11 = 22.74325 if districtW11 == 10935
replace GB17_marginW11 = 22.53112 if districtW11 == 10936
replace GB17_marginW11 = 25.6468 if districtW11 == 10937
replace GB17_marginW11 = 32.77281 if districtW11 == 10938
replace GB17_marginW11 = 49.48226 if districtW11 == 10939
replace GB17_marginW11 = 32.86529 if districtW11 == 10940
replace GB17_marginW11 = 27.29132 if districtW11 == 10941
replace GB17_marginW11 = 35.13955 if districtW11 == 10942
replace GB17_marginW11 = 13.53357 if districtW11 == 10943
replace GB17_marginW11 = 35.58324 if districtW11 == 10944
replace GB17_marginW11 = 44.47945 if districtW11 == 10945
replace GB17_marginW11 = 32.7261 if districtW11 == 10946
replace GB17_marginW11 = 4.805836 if districtW11 == 10947
replace GB17_marginW11 = 12.83742 if districtW11 == 10948
replace GB17_marginW11 = 25.46598 if districtW11 == 10949
replace GB17_marginW11 = 29.92225 if districtW11 == 10950
replace GB17_marginW11 = 32.23254 if districtW11 == 10951
replace GB17_marginW11 = 34.93589 if districtW11 == 10952
replace GB17_marginW11 = 35.7261 if districtW11 == 10953
replace GB17_marginW11 = 33.47153 if districtW11 == 10954
replace GB17_marginW11 = .0662625 if districtW11 == 10955
replace GB17_marginW11 = 24.52509 if districtW11 == 10956
replace GB17_marginW11 = 21.19048 if districtW11 == 10957
replace GB17_marginW11 = 6.076402 if districtW11 == 10958
replace GB17_marginW11 = 26.78838 if districtW11 == 10959
replace GB17_marginW11 = 10.71792 if districtW11 == 10960
replace GB17_marginW11 = 20.55264 if districtW11 == 10961
replace GB17_marginW11 = 36.64928 if districtW11 == 10962
replace GB17_marginW11 = 46.02919 if districtW11 == 10963
replace GB17_marginW11 = .6090641 if districtW11 == 10964
replace GB17_marginW11 = 14.88521 if districtW11 == 10965
replace GB17_marginW11 = 24.2526 if districtW11 == 10966
replace GB17_marginW11 = 19.04045 if districtW11 == 10967
replace GB17_marginW11 = 6.864393 if districtW11 == 10968
replace GB17_marginW11 = 34.84739 if districtW11 == 10969
replace GB17_marginW11 = 20.39503 if districtW11 == 10970
replace GB17_marginW11 = 1.649824 if districtW11 == 10971
replace GB17_marginW11 = 11.75743 if districtW11 == 10972
replace GB17_marginW11 = 5.645433 if districtW11 == 10973
replace GB17_marginW11 = 1.590309 if districtW11 == 10974
replace GB17_marginW11 = 34.96762 if districtW11 == 10975
replace GB17_marginW11 = 16.23846 if districtW11 == 10976
replace GB17_marginW11 = 41.01846 if districtW11 == 10977
replace GB17_marginW11 = 47.10995 if districtW11 == 10978
replace GB17_marginW11 = 39.26003 if districtW11 == 10979
replace GB17_marginW11 = 1.076531 if districtW11 == 10980
replace GB17_marginW11 = 27.57172 if districtW11 == 10981
replace GB17_marginW11 = 22.16089 if districtW11 == 10982
replace GB17_marginW11 = 43.13756 if districtW11 == 10983
replace GB17_marginW11 = 24.43333 if districtW11 == 10984
replace GB17_marginW11 = 29.01926 if districtW11 == 10985
replace GB17_marginW11 = 26.20887 if districtW11 == 10986
replace GB17_marginW11 = 30.10628 if districtW11 == 10987
replace GB17_marginW11 = 25.19627 if districtW11 == 10988
replace GB17_marginW11 = 1.611242 if districtW11 == 10989
replace GB17_marginW11 = 38.20662 if districtW11 == 10990
replace GB17_marginW11 = 42.71046 if districtW11 == 10991
replace GB17_marginW11 = 19.31224 if districtW11 == 10992
replace GB17_marginW11 = 33.97343 if districtW11 == 10993
replace GB17_marginW11 = 23.81337 if districtW11 == 10994
replace GB17_marginW11 = .6855428 if districtW11 == 10995
replace GB17_marginW11 = 34.2489 if districtW11 == 10996
replace GB17_marginW11 = 41.3095 if districtW11 == 10997
replace GB17_marginW11 = 26.57338 if districtW11 == 10998
replace GB17_marginW11 = 27.91066 if districtW11 == 10999
replace GB17_marginW11 = 34.77808 if districtW11 == 11000
replace GB17_marginW11 = 26.80923 if districtW11 == 11001
replace GB17_marginW11 = 70.09465 if districtW11 == 11002
replace GB17_marginW11 = 6.694088 if districtW11 == 11003
replace GB17_marginW11 = 30.37319 if districtW11 == 11004
replace GB17_marginW11 = 14.7262 if districtW11 == 11005
replace GB17_marginW11 = 20.51778 if districtW11 == 11006
replace GB17_marginW11 = 10.78083 if districtW11 == 11007
replace GB17_marginW11 = 36.79009 if districtW11 == 11008
replace GB17_marginW11 = 4.701409 if districtW11 == 11009
replace GB17_marginW11 = 48.22865 if districtW11 == 11010
replace GB17_marginW11 = 6.823549 if districtW11 == 11011
replace GB17_marginW11 = 20.17608 if districtW11 == 11012
replace GB17_marginW11 = 66.50395 if districtW11 == 11013
replace GB17_marginW11 = 24.57955 if districtW11 == 11014
replace GB17_marginW11 = 27.32619 if districtW11 == 11015
replace GB17_marginW11 = 40.99637 if districtW11 == 11016
replace GB17_marginW11 = 19.74978 if districtW11 == 11017
replace GB17_marginW11 = 4.111621 if districtW11 == 11018
replace GB17_marginW11 = 2.231061 if districtW11 == 11019
replace GB17_marginW11 = 31.89235 if districtW11 == 11020
replace GB17_marginW11 = 3.569355 if districtW11 == 11021
replace GB17_marginW11 = 17.4944 if districtW11 == 11022
replace GB17_marginW11 = 39.0778 if districtW11 == 11023
replace GB17_marginW11 = 7.760849 if districtW11 == 11024
replace GB17_marginW11 = 23.40346 if districtW11 == 11025
replace GB17_marginW11 = 12.46158 if districtW11 == 11026
replace GB17_marginW11 = 14.26194 if districtW11 == 11027
replace GB17_marginW11 = 33.68376 if districtW11 == 11028
replace GB17_marginW11 = 19.72736 if districtW11 == 11029
replace GB17_marginW11 = 12.35663 if districtW11 == 11030
replace GB17_marginW11 = 32.03296 if districtW11 == 11031
replace GB17_marginW11 = 60.54227 if districtW11 == 11032
replace GB17_marginW11 = 21.49148 if districtW11 == 11033
replace GB17_marginW11 = 32.97453 if districtW11 == 11034
replace GB17_marginW11 = 37.76806 if districtW11 == 11035
replace GB17_marginW11 = 26.58968 if districtW11 == 11036
replace GB17_marginW11 = 1.50328 if districtW11 == 11037
replace GB17_marginW11 = 20.46264 if districtW11 == 11038
replace GB17_marginW11 = 33.71124 if districtW11 == 11039
replace GB17_marginW11 = 10.911 if districtW11 == 11040
replace GB17_marginW11 = 17.49422 if districtW11 == 11041
replace GB17_marginW11 = 41.51258 if districtW11 == 11042
replace GB17_marginW11 = 18.41575 if districtW11 == 11043
replace GB17_marginW11 = 12.20677 if districtW11 == 11044
replace GB17_marginW11 = 37.86682 if districtW11 == 11045
replace GB17_marginW11 = 34.86303 if districtW11 == 11046
replace GB17_marginW11 = 30.27187 if districtW11 == 11047
replace GB17_marginW11 = 31.49271 if districtW11 == 11048
replace GB17_marginW11 = 12.56437 if districtW11 == 11049
replace GB17_marginW11 = 23.45196 if districtW11 == 11050
replace GB17_marginW11 = 5.159873 if districtW11 == 11051
replace GB17_marginW11 = 4.877195 if districtW11 == 11052
replace GB17_marginW11 = 9.417892 if districtW11 == 11053
replace GB17_marginW11 = 18.35809 if districtW11 == 11054
replace GB17_marginW11 = 22.18226 if districtW11 == 11055
replace GB17_marginW11 = 12.29694 if districtW11 == 11056
replace GB17_marginW11 = 23.26103 if districtW11 == 11057
replace GB17_marginW11 = 26.07913 if districtW11 == 11058
replace GB17_marginW11 = 32.59608 if districtW11 == 11059
replace GB17_marginW11 = 24.78452 if districtW11 == 11060
replace GB17_marginW11 = 34.98908 if districtW11 == 11061
replace GB17_marginW11 = 14.43397 if districtW11 == 11062
replace GB17_marginW11 = 19.75751 if districtW11 == 40001
replace GB17_marginW11 = 4.530215 if districtW11 == 40002
replace GB17_marginW11 = 4.566982 if districtW11 == 40003
replace GB17_marginW11 = 53.28674 if districtW11 == 40004
replace GB17_marginW11 = 41.74554 if districtW11 == 40005
replace GB17_marginW11 = 21.55009 if districtW11 == 40006
replace GB17_marginW11 = 1.636097 if districtW11 == 40007
replace GB17_marginW11 = .3676713 if districtW11 == 40008
replace GB17_marginW11 = 42.80149 if districtW11 == 40009
replace GB17_marginW11 = 27.60526 if districtW11 == 40010
replace GB17_marginW11 = 23.30951 if districtW11 == 40011
replace GB17_marginW11 = 42.59801 if districtW11 == 40012
replace GB17_marginW11 = 3.082812 if districtW11 == 40013
replace GB17_marginW11 = 7.431087 if districtW11 == 40014
replace GB17_marginW11 = 4.806161 if districtW11 == 40015
replace GB17_marginW11 = 47.33799 if districtW11 == 40016
replace GB17_marginW11 = 15.59171 if districtW11 == 40017
replace GB17_marginW11 = 23.78237 if districtW11 == 40018
replace GB17_marginW11 = 11.26044 if districtW11 == 20001
replace GB17_marginW11 = 10.68033 if districtW11 == 20002
replace GB17_marginW11 = .5131304 if districtW11 == 20003
replace GB17_marginW11 = 6.58091 if districtW11 == 20004
replace GB17_marginW11 = 2.762696 if districtW11 == 20005
replace GB17_marginW11 = 6.00147 if districtW11 == 20006
replace GB17_marginW11 = 8.868238 if districtW11 == 20007
replace GB17_marginW11 = 21.12017 if districtW11 == 20008
replace GB17_marginW11 = 6.614673 if districtW11 == 20009
replace GB17_marginW11 = 2.810123 if districtW11 == 20010
replace GB17_marginW11 = 3.521314 if districtW11 == 20011
replace GB17_marginW11 = 9.72783 if districtW11 == 20012
replace GB17_marginW11 = 10.93626 if districtW11 == 20013
replace GB17_marginW11 = 19.28151 if districtW11 == 20014
replace GB17_marginW11 = 15.47941 if districtW11 == 20015
replace GB17_marginW11 = 13.60498 if districtW11 == 20016
replace GB17_marginW11 = 1.654577 if districtW11 == 20017
replace GB17_marginW11 = 10.30675 if districtW11 == 20018
replace GB17_marginW11 = 7.145762 if districtW11 == 20019
replace GB17_marginW11 = 5.517375 if districtW11 == 20020
replace GB17_marginW11 = 8.768469 if districtW11 == 20021
replace GB17_marginW11 = 7.869401 if districtW11 == 20022
replace GB17_marginW11 = 2.873462 if districtW11 == 20023
replace GB17_marginW11 = 32.42893 if districtW11 == 20024
replace GB17_marginW11 = 2.221096 if districtW11 == 20025
replace GB17_marginW11 = 5.659628 if districtW11 == 20026
replace GB17_marginW11 = 6.795791 if districtW11 == 20027
replace GB17_marginW11 = 9.149027 if districtW11 == 20028
replace GB17_marginW11 = 6.300023 if districtW11 == 20029
replace GB17_marginW11 = .2073765 if districtW11 == 20030
replace GB17_marginW11 = 3.166732 if districtW11 == 20031
replace GB17_marginW11 = .7616073 if districtW11 == 20032
replace GB17_marginW11 = 6.59304 if districtW11 == 20033
replace GB17_marginW11 = 4.549944 if districtW11 == 20034
replace GB17_marginW11 = .1695961 if districtW11 == 20035
replace GB17_marginW11 = 8.086833 if districtW11 == 20036
replace GB17_marginW11 = 4.856104 if districtW11 == 20037
replace GB17_marginW11 = .9822726 if districtW11 == 20038
replace GB17_marginW11 = 9.325579 if districtW11 == 20039
replace GB17_marginW11 = 13.47911 if districtW11 == 20040
replace GB17_marginW11 = .560689 if districtW11 == 20041
replace GB17_marginW11 = .5270451 if districtW11 == 20042
replace GB17_marginW11 = 5.203766 if districtW11 == 20043
replace GB17_marginW11 = 7.385963 if districtW11 == 20044
replace GB17_marginW11 = 1.954806 if districtW11 == 20045
replace GB17_marginW11 = 8.736476 if districtW11 == 20046
replace GB17_marginW11 = .758478 if districtW11 == 20047
replace GB17_marginW11 = 7.659224 if districtW11 == 20048
replace GB17_marginW11 = .0047833 if districtW11 == 20049
replace GB17_marginW11 = 6.201079 if districtW11 == 20050
replace GB17_marginW11 = 19.60304 if districtW11 == 20051
replace GB17_marginW11 = 5.605492 if districtW11 == 20052
replace GB17_marginW11 = 6.091774 if districtW11 == 20053
replace GB17_marginW11 = .0407577 if districtW11 == 20054
replace GB17_marginW11 = 15.39242 if districtW11 == 20055
replace GB17_marginW11 = .5209148 if districtW11 == 20056
replace GB17_marginW11 = .299862 if districtW11 == 20057
replace GB17_marginW11 = 15.39952 if districtW11 == 20058
replace GB17_marginW11 = 5.190208 if districtW11 == 20059
replace GB17_marginW11 = 14.07391 if districtW11 == 30041
replace GB17_marginW11 = 10.7565 if districtW11 == 30042
replace GB17_marginW11 = 11.69571 if districtW11 == 30043
replace GB17_marginW11 = 5.220562 if districtW11 == 30044
replace GB17_marginW11 = 29.80517 if districtW11 == 30045
replace GB17_marginW11 = 7.172635 if districtW11 == 30046
replace GB17_marginW11 = 28.42659 if districtW11 == 30047
replace GB17_marginW11 = 37.45271 if districtW11 == 30048
replace GB17_marginW11 = 50.38175 if districtW11 == 30049
replace GB17_marginW11 = 42.59915 if districtW11 == 30050
replace GB17_marginW11 = 8.023527 if districtW11 == 30051
replace GB17_marginW11 = 41.73549 if districtW11 == 30052
replace GB17_marginW11 = 26.64654 if districtW11 == 30053
replace GB17_marginW11 = 16.49977 if districtW11 == 30054
replace GB17_marginW11 = 21.73547 if districtW11 == 30055
replace GB17_marginW11 = 13.02547 if districtW11 == 30056
replace GB17_marginW11 = .3261477 if districtW11 == 30057
replace GB17_marginW11 = 1.975116 if districtW11 == 30058
replace GB17_marginW11 = 8.454272 if districtW11 == 30059
replace GB17_marginW11 = 6.149831 if districtW11 == 30060
replace GB17_marginW11 = 15.98128 if districtW11 == 30061
replace GB17_marginW11 = 11.62406 if districtW11 == 30062
replace GB17_marginW11 = 26.61145 if districtW11 == 30063
replace GB17_marginW11 = .2615243 if districtW11 == 30064
replace GB17_marginW11 = .7441282 if districtW11 == 30065
replace GB17_marginW11 = 7.365129 if districtW11 == 30066
replace GB17_marginW11 = 9.524971 if districtW11 == 30067
replace GB17_marginW11 = 19.44646 if districtW11 == 30068
replace GB17_marginW11 = 32.99203 if districtW11 == 30069
replace GB17_marginW11 = 41.62631 if districtW11 == 30070
replace GB17_marginW11 = 48.6928 if districtW11 == 30071
replace GB17_marginW11 = 36.76816 if districtW11 == 30072
replace GB17_marginW11 = 10.8658 if districtW11 == 30073
replace GB17_marginW11 = 37.28363 if districtW11 == 30074
replace GB17_marginW11 = 28.69604 if districtW11 == 30075
replace GB17_marginW11 = 29.24667 if districtW11 == 30076
replace GB17_marginW11 = 31.61832 if districtW11 == 30077
replace GB17_marginW11 = 4.076844 if districtW11 == 30078
replace GB17_marginW11 = 26.91673 if districtW11 == 30079
replace GB17_marginW11 = 29.29675 if districtW11 == 30080

gen GB17_marginW12 = .

replace GB17_marginW12 = 23.4382 if districtW12 == 10530
replace GB17_marginW12 = 35.55859 if districtW12 == 10531
replace GB17_marginW12 = 12.17276 if districtW12 == 10532
replace GB17_marginW12 = 18.11792 if districtW12 == 10533
replace GB17_marginW12 = 39.63588 if districtW12 == 10534
replace GB17_marginW12 = .8821249 if districtW12 == 10535
replace GB17_marginW12 = 29.18887 if districtW12 == 10536
replace GB17_marginW12 = 28.39866 if districtW12 == 10537
replace GB17_marginW12 = 24.93237 if districtW12 == 10538
replace GB17_marginW12 = 20.14067 if districtW12 == 10539
replace GB17_marginW12 = 45.31974 if districtW12 == 10540
replace GB17_marginW12 = 39.77282 if districtW12 == 10541
replace GB17_marginW12 = 32.57553 if districtW12 == 10542
replace GB17_marginW12 = .439167 if districtW12 == 10543
replace GB17_marginW12 = 29.83214 if districtW12 == 10544
replace GB17_marginW12 = 16.91565 if districtW12 == 10545
replace GB17_marginW12 = 9.286126 if districtW12 == 10546
replace GB17_marginW12 = 11.48377 if districtW12 == 10547
replace GB17_marginW12 = 16.66233 if districtW12 == 10548
replace GB17_marginW12 = 4.3881 if districtW12 == 10549
replace GB17_marginW12 = 43.80488 if districtW12 == 10550
replace GB17_marginW12 = 29.22139 if districtW12 == 10551
replace GB17_marginW12 = 1.627475 if districtW12 == 10552
replace GB17_marginW12 = 22.1664 if districtW12 == 10553
replace GB17_marginW12 = 27.90913 if districtW12 == 10554
replace GB17_marginW12 = 59.16089 if districtW12 == 10555
replace GB17_marginW12 = 25.23814 if districtW12 == 10556
replace GB17_marginW12 = 37.26964 if districtW12 == 10557
replace GB17_marginW12 = 20.0779 if districtW12 == 10558
replace GB17_marginW12 = 58.43391 if districtW12 == 10559
replace GB17_marginW12 = 15.86032 if districtW12 == 10560
replace GB17_marginW12 = 19.57439 if districtW12 == 10561
replace GB17_marginW12 = 62.50046 if districtW12 == 10562
replace GB17_marginW12 = 66.87502 if districtW12 == 10563
replace GB17_marginW12 = 69.51364 if districtW12 == 10564
replace GB17_marginW12 = 10.52358 if districtW12 == 10565
replace GB17_marginW12 = 41.59332 if districtW12 == 10566
replace GB17_marginW12 = 31.0442 if districtW12 == 10567
replace GB17_marginW12 = 37.24327 if districtW12 == 10568
replace GB17_marginW12 = 1.159862 if districtW12 == 10569
replace GB17_marginW12 = 42.86646 if districtW12 == 10570
replace GB17_marginW12 = 48.86446 if districtW12 == 10571
replace GB17_marginW12 = 4.933304 if districtW12 == 10572
replace GB17_marginW12 = 7.218263 if districtW12 == 10573
replace GB17_marginW12 = 28.02804 if districtW12 == 10574
replace GB17_marginW12 = 18.62791 if districtW12 == 10575
replace GB17_marginW12 = 34.06683 if districtW12 == 10576
replace GB17_marginW12 = 11.3674 if districtW12 == 10577
replace GB17_marginW12 = 8.403605 if districtW12 == 10578
replace GB17_marginW12 = 31.01387 if districtW12 == 10579
replace GB17_marginW12 = 1.833352 if districtW12 == 10580
replace GB17_marginW12 = 71.98537 if districtW12 == 10581
replace GB17_marginW12 = 38.64829 if districtW12 == 10582
replace GB17_marginW12 = 32.67163 if districtW12 == 10583
replace GB17_marginW12 = 16.32523 if districtW12 == 10584
replace GB17_marginW12 = 17.32536 if districtW12 == 10585
replace GB17_marginW12 = 28.65526 if districtW12 == 10586
replace GB17_marginW12 = 45.02214 if districtW12 == 10587
replace GB17_marginW12 = 16.32196 if districtW12 == 10588
replace GB17_marginW12 = 48.10666 if districtW12 == 10589
replace GB17_marginW12 = 35.2062 if districtW12 == 10590
replace GB17_marginW12 = 53.53564 if districtW12 == 10591
replace GB17_marginW12 = 30.22642 if districtW12 == 10592
replace GB17_marginW12 = 19.76667 if districtW12 == 10593
replace GB17_marginW12 = 45.36383 if districtW12 == 10594
replace GB17_marginW12 = 26.51244 if districtW12 == 10595
replace GB17_marginW12 = 27.43858 if districtW12 == 10596
replace GB17_marginW12 = 20.05406 if districtW12 == 10597
replace GB17_marginW12 = 25.48061 if districtW12 == 10598
replace GB17_marginW12 = 26.36666 if districtW12 == 10599
replace GB17_marginW12 = 8.801023 if districtW12 == 10600
replace GB17_marginW12 = 29.3976 if districtW12 == 10601
replace GB17_marginW12 = 52.13943 if districtW12 == 10602
replace GB17_marginW12 = 28.25749 if districtW12 == 10603
replace GB17_marginW12 = 20.55205 if districtW12 == 10604
replace GB17_marginW12 = 30.66803 if districtW12 == 10605
replace GB17_marginW12 = 33.25682 if districtW12 == 10606
replace GB17_marginW12 = 1.554731 if districtW12 == 10607
replace GB17_marginW12 = 48.8335 if districtW12 == 10608
replace GB17_marginW12 = 15.76818 if districtW12 == 10609
replace GB17_marginW12 = 20.12983 if districtW12 == 10610
replace GB17_marginW12 = 9.133041 if districtW12 == 10611
replace GB17_marginW12 = 11.69837 if districtW12 == 10612
replace GB17_marginW12 = 29.66699 if districtW12 == 10613
replace GB17_marginW12 = 1.049024 if districtW12 == 10614
replace GB17_marginW12 = 64.99686 if districtW12 == 10615
replace GB17_marginW12 = 3.2545 if districtW12 == 10616
replace GB17_marginW12 = 22.63561 if districtW12 == 10617
replace GB17_marginW12 = 17.52799 if districtW12 == 10618
replace GB17_marginW12 = .3292233 if districtW12 == 10619
replace GB17_marginW12 = 6.036324 if districtW12 == 10620
replace GB17_marginW12 = 2.697378 if districtW12 == 10621
replace GB17_marginW12 = 42.2098 if districtW12 == 10622
replace GB17_marginW12 = 27.10739 if districtW12 == 10623
replace GB17_marginW12 = 30.40302 if districtW12 == 10624
replace GB17_marginW12 = 29.61613 if districtW12 == 10625
replace GB17_marginW12 = 23.29695 if districtW12 == 10626
replace GB17_marginW12 = 8.258814 if districtW12 == 10627
replace GB17_marginW12 = 23.86915 if districtW12 == 10628
replace GB17_marginW12 = 19.436 if districtW12 == 10629
replace GB17_marginW12 = 4.506069 if districtW12 == 10630
replace GB17_marginW12 = 40.07095 if districtW12 == 10631
replace GB17_marginW12 = 20.0409 if districtW12 == 10632
replace GB17_marginW12 = 37.75326 if districtW12 == 10633
replace GB17_marginW12 = 5.191544 if districtW12 == 10634
replace GB17_marginW12 = 29.10395 if districtW12 == 10635
replace GB17_marginW12 = .6369203 if districtW12 == 10636
replace GB17_marginW12 = 13.50253 if districtW12 == 10637
replace GB17_marginW12 = 49.71165 if districtW12 == 10638
replace GB17_marginW12 = 8.144048 if districtW12 == 10639
replace GB17_marginW12 = 16.26345 if districtW12 == 10640
replace GB17_marginW12 = 25.58563 if districtW12 == 10641
replace GB17_marginW12 = 35.85457 if districtW12 == 10642
replace GB17_marginW12 = 21.73731 if districtW12 == 10643
replace GB17_marginW12 = 10.60229 if districtW12 == 10644
replace GB17_marginW12 = 1.514402 if districtW12 == 10645
replace GB17_marginW12 = 22.44136 if districtW12 == 10646
replace GB17_marginW12 = 3.948563 if districtW12 == 10647
replace GB17_marginW12 = 4.483557 if districtW12 == 10648
replace GB17_marginW12 = 33.49961 if districtW12 == 10649
replace GB17_marginW12 = 17.21198 if districtW12 == 10650
replace GB17_marginW12 = 16.90528 if districtW12 == 10651
replace GB17_marginW12 = 4.887319 if districtW12 == 10652
replace GB17_marginW12 = .0872314 if districtW12 == 10653
replace GB17_marginW12 = 9.899986 if districtW12 == 10654
replace GB17_marginW12 = 54.28275 if districtW12 == 10655
replace GB17_marginW12 = 18.61991 if districtW12 == 10656
replace GB17_marginW12 = 10.14768 if districtW12 == 10657
replace GB17_marginW12 = 7.318649 if districtW12 == 10658
replace GB17_marginW12 = 24.31765 if districtW12 == 10659
replace GB17_marginW12 = 39.04569 if districtW12 == 10660
replace GB17_marginW12 = 35.54887 if districtW12 == 10661
replace GB17_marginW12 = 4.139957 if districtW12 == 10662
replace GB17_marginW12 = 24.82673 if districtW12 == 10663
replace GB17_marginW12 = 28.90198 if districtW12 == 10664
replace GB17_marginW12 = 41.77654 if districtW12 == 10665
replace GB17_marginW12 = 5.873198 if districtW12 == 10666
replace GB17_marginW12 = 11.23989 if districtW12 == 10667
replace GB17_marginW12 = 23.54732 if districtW12 == 10668
replace GB17_marginW12 = 33.14426 if districtW12 == 10669
replace GB17_marginW12 = 12.38695 if districtW12 == 10670
replace GB17_marginW12 = .056538 if districtW12 == 10671
replace GB17_marginW12 = 20.21232 if districtW12 == 10672
replace GB17_marginW12 = 50.15051 if districtW12 == 10673
replace GB17_marginW12 = 24.9485 if districtW12 == 10674
replace GB17_marginW12 = 37.49905 if districtW12 == 10675
replace GB17_marginW12 = 48.93122 if districtW12 == 10676
replace GB17_marginW12 = 40.95259 if districtW12 == 10677
replace GB17_marginW12 = 13.3086 if districtW12 == 10678
replace GB17_marginW12 = 70.42361 if districtW12 == 10679
replace GB17_marginW12 = 46.65752 if districtW12 == 10680
replace GB17_marginW12 = 40.39322 if districtW12 == 10681
replace GB17_marginW12 = 9.612742 if districtW12 == 10682
replace GB17_marginW12 = 27.81155 if districtW12 == 10683
replace GB17_marginW12 = 2.80216 if districtW12 == 10684
replace GB17_marginW12 = 24.75384 if districtW12 == 10685
replace GB17_marginW12 = 23.27013 if districtW12 == 10686
replace GB17_marginW12 = 48.34241 if districtW12 == 10687
replace GB17_marginW12 = 22.36008 if districtW12 == 10688
replace GB17_marginW12 = 16.46737 if districtW12 == 10689
replace GB17_marginW12 = 13.64099 if districtW12 == 10690
replace GB17_marginW12 = 21.09956 if districtW12 == 10691
replace GB17_marginW12 = 9.011337 if districtW12 == 10692
replace GB17_marginW12 = 35.92627 if districtW12 == 10693
replace GB17_marginW12 = 34.54763 if districtW12 == 10694
replace GB17_marginW12 = 9.107894 if districtW12 == 10695
replace GB17_marginW12 = 22.52159 if districtW12 == 10696
replace GB17_marginW12 = 38.93253 if districtW12 == 10697
replace GB17_marginW12 = 29.07999 if districtW12 == 10698
replace GB17_marginW12 = 37.8065 if districtW12 == 10699
replace GB17_marginW12 = 35.00171 if districtW12 == 10700
replace GB17_marginW12 = 29.42463 if districtW12 == 10701
replace GB17_marginW12 = 8.263972 if districtW12 == 10702
replace GB17_marginW12 = 3.163117 if districtW12 == 10703
replace GB17_marginW12 = 26.17579 if districtW12 == 10704
replace GB17_marginW12 = 18.35532 if districtW12 == 10705
replace GB17_marginW12 = 25.40512 if districtW12 == 10706
replace GB17_marginW12 = 33.10258 if districtW12 == 10707
replace GB17_marginW12 = 60.06689 if districtW12 == 10708
replace GB17_marginW12 = 41.20847 if districtW12 == 10709
replace GB17_marginW12 = 9.082466 if districtW12 == 10710
replace GB17_marginW12 = 19.29688 if districtW12 == 10711
replace GB17_marginW12 = 10.2088 if districtW12 == 10712
replace GB17_marginW12 = 34.78305 if districtW12 == 10713
replace GB17_marginW12 = 35.50616 if districtW12 == 10714
replace GB17_marginW12 = 19.07668 if districtW12 == 10715
replace GB17_marginW12 = 7.221082 if districtW12 == 10716
replace GB17_marginW12 = 18.06053 if districtW12 == 10717
replace GB17_marginW12 = 39.005 if districtW12 == 10718
replace GB17_marginW12 = 30.69773 if districtW12 == 10719
replace GB17_marginW12 = 62.41607 if districtW12 == 10720
replace GB17_marginW12 = 68.52441 if districtW12 == 10721
replace GB17_marginW12 = 11.83668 if districtW12 == 10722
replace GB17_marginW12 = 11.13597 if districtW12 == 10723
replace GB17_marginW12 = 29.94751 if districtW12 == 10724
replace GB17_marginW12 = 51.30458 if districtW12 == 10725
replace GB17_marginW12 = 35.69433 if districtW12 == 10726
replace GB17_marginW12 = 26.64064 if districtW12 == 10727
replace GB17_marginW12 = 21.57887 if districtW12 == 10728
replace GB17_marginW12 = 15.6781 if districtW12 == 10729
replace GB17_marginW12 = 32.01974 if districtW12 == 10730
replace GB17_marginW12 = 3.4556 if districtW12 == 10731
replace GB17_marginW12 = 26.44028 if districtW12 == 10732
replace GB17_marginW12 = 18.28612 if districtW12 == 10733
replace GB17_marginW12 = 28.07141 if districtW12 == 10734
replace GB17_marginW12 = .6317794 if districtW12 == 10735
replace GB17_marginW12 = 34.45179 if districtW12 == 10736
replace GB17_marginW12 = 37.8959 if districtW12 == 10737
replace GB17_marginW12 = 12.49433 if districtW12 == 10738
replace GB17_marginW12 = 18.06549 if districtW12 == 10739
replace GB17_marginW12 = 22.14435 if districtW12 == 10740
replace GB17_marginW12 = 2.053049 if districtW12 == 10741
replace GB17_marginW12 = 39.04446 if districtW12 == 10742
replace GB17_marginW12 = 29.73814 if districtW12 == 10743
replace GB17_marginW12 = 31.72923 if districtW12 == 10744
replace GB17_marginW12 = 32.44024 if districtW12 == 10745
replace GB17_marginW12 = 19.98096 if districtW12 == 10746
replace GB17_marginW12 = 15.27524 if districtW12 == 10747
replace GB17_marginW12 = 4.311738 if districtW12 == 10748
replace GB17_marginW12 = 20.4668 if districtW12 == 10749
replace GB17_marginW12 = 51.7128 if districtW12 == 10750
replace GB17_marginW12 = 31.6228 if districtW12 == 10751
replace GB17_marginW12 = 49.34423 if districtW12 == 10752
replace GB17_marginW12 = 37.88536 if districtW12 == 10753
replace GB17_marginW12 = 29.75169 if districtW12 == 10754
replace GB17_marginW12 = 32.5665 if districtW12 == 10755
replace GB17_marginW12 = 27.38742 if districtW12 == 10756
replace GB17_marginW12 = 24.23811 if districtW12 == 10757
replace GB17_marginW12 = 12.86447 if districtW12 == 10758
replace GB17_marginW12 = 18.20706 if districtW12 == 10759
replace GB17_marginW12 = 54.88839 if districtW12 == 10760
replace GB17_marginW12 = 1.625046 if districtW12 == 10761
replace GB17_marginW12 = 28.28851 if districtW12 == 10762
replace GB17_marginW12 = 60.47007 if districtW12 == 10763
replace GB17_marginW12 = 42.17153 if districtW12 == 10764
replace GB17_marginW12 = 40.12505 if districtW12 == 10765
replace GB17_marginW12 = .4621565 if districtW12 == 10766
replace GB17_marginW12 = 35.22145 if districtW12 == 10767
replace GB17_marginW12 = .05171 if districtW12 == 10768
replace GB17_marginW12 = 21.37884 if districtW12 == 10769
replace GB17_marginW12 = 6.632572 if districtW12 == 10770
replace GB17_marginW12 = 28.37491 if districtW12 == 10771
replace GB17_marginW12 = 38.5809 if districtW12 == 10772
replace GB17_marginW12 = 23.21713 if districtW12 == 10773
replace GB17_marginW12 = 15.38745 if districtW12 == 10774
replace GB17_marginW12 = 76.08456 if districtW12 == 10775
replace GB17_marginW12 = 14.4839 if districtW12 == 10776
replace GB17_marginW12 = 49.70948 if districtW12 == 10777
replace GB17_marginW12 = 30.77146 if districtW12 == 10778
replace GB17_marginW12 = 32.05909 if districtW12 == 10779
replace GB17_marginW12 = 9.12567 if districtW12 == 10780
replace GB17_marginW12 = 37.80577 if districtW12 == 10781
replace GB17_marginW12 = 42.78193 if districtW12 == 10782
replace GB17_marginW12 = 51.98448 if districtW12 == 10783
replace GB17_marginW12 = 29.4839 if districtW12 == 10784
replace GB17_marginW12 = 20.3823 if districtW12 == 10785
replace GB17_marginW12 = 10.16386 if districtW12 == 10786
replace GB17_marginW12 = 44.94185 if districtW12 == 10787
replace GB17_marginW12 = 43.54087 if districtW12 == 10788
replace GB17_marginW12 = 63.32378 if districtW12 == 10789
replace GB17_marginW12 = 48.96151 if districtW12 == 10790
replace GB17_marginW12 = 34.71527 if districtW12 == 10791
replace GB17_marginW12 = 3.156942 if districtW12 == 10792
replace GB17_marginW12 = 74.85839 if districtW12 == 10793
replace GB17_marginW12 = 77.14056 if districtW12 == 10794
replace GB17_marginW12 = 67.52062 if districtW12 == 10795
replace GB17_marginW12 = 72.86496 if districtW12 == 10796
replace GB17_marginW12 = 7.883948 if districtW12 == 10797
replace GB17_marginW12 = 37.2193 if districtW12 == 10798
replace GB17_marginW12 = 38.59516 if districtW12 == 10799
replace GB17_marginW12 = 30.80949 if districtW12 == 10800
replace GB17_marginW12 = 30.18447 if districtW12 == 10801
replace GB17_marginW12 = 15.85063 if districtW12 == 10802
replace GB17_marginW12 = 45.42832 if districtW12 == 10803
replace GB17_marginW12 = 34.2692 if districtW12 == 10804
replace GB17_marginW12 = 28.8539 if districtW12 == 10805
replace GB17_marginW12 = 46.67145 if districtW12 == 10806
replace GB17_marginW12 = 63.24417 if districtW12 == 10807
replace GB17_marginW12 = 69.04881 if districtW12 == 10808
replace GB17_marginW12 = 55.73486 if districtW12 == 10809
replace GB17_marginW12 = 2.107385 if districtW12 == 10810
replace GB17_marginW12 = 47.40921 if districtW12 == 10811
replace GB17_marginW12 = 35.1335 if districtW12 == 10812
replace GB17_marginW12 = 33.23355 if districtW12 == 10813
replace GB17_marginW12 = 23.06089 if districtW12 == 10814
replace GB17_marginW12 = 31.78804 if districtW12 == 10815
replace GB17_marginW12 = 28.89631 if districtW12 == 10816
replace GB17_marginW12 = 31.9201 if districtW12 == 10817
replace GB17_marginW12 = 42.34239 if districtW12 == 10818
replace GB17_marginW12 = 38.92864 if districtW12 == 10819
replace GB17_marginW12 = 2.141958 if districtW12 == 10820
replace GB17_marginW12 = 3.089604 if districtW12 == 10821
replace GB17_marginW12 = 2.579555 if districtW12 == 10822
replace GB17_marginW12 = 44.42204 if districtW12 == 10823
replace GB17_marginW12 = 42.55015 if districtW12 == 10824
replace GB17_marginW12 = 3.064153 if districtW12 == 10825
replace GB17_marginW12 = 4.018566 if districtW12 == 10826
replace GB17_marginW12 = 42.82016 if districtW12 == 10827
replace GB17_marginW12 = 47.21422 if districtW12 == 10828
replace GB17_marginW12 = 32.973 if districtW12 == 10829
replace GB17_marginW12 = 40.06639 if districtW12 == 10830
replace GB17_marginW12 = 40.26797 if districtW12 == 10831
replace GB17_marginW12 = 46.25934 if districtW12 == 10832
replace GB17_marginW12 = 21.43182 if districtW12 == 10833
replace GB17_marginW12 = .0684291 if districtW12 == 10834
replace GB17_marginW12 = 33.23198 if districtW12 == 10835
replace GB17_marginW12 = 29.47491 if districtW12 == 10836
replace GB17_marginW12 = 14.13317 if districtW12 == 10837
replace GB17_marginW12 = 7.77668 if districtW12 == 10838
replace GB17_marginW12 = 46.25835 if districtW12 == 10839
replace GB17_marginW12 = 29.89326 if districtW12 == 10840
replace GB17_marginW12 = 32.48521 if districtW12 == 10841
replace GB17_marginW12 = 39.91817 if districtW12 == 10842
replace GB17_marginW12 = 5.676857 if districtW12 == 10843
replace GB17_marginW12 = 48.19268 if districtW12 == 10844
replace GB17_marginW12 = 30.28967 if districtW12 == 10845
replace GB17_marginW12 = 18.93863 if districtW12 == 10846
replace GB17_marginW12 = 43.0516 if districtW12 == 10847
replace GB17_marginW12 = 6.729517 if districtW12 == 10848
replace GB17_marginW12 = 29.41599 if districtW12 == 10849
replace GB17_marginW12 = 27.58816 if districtW12 == 10850
replace GB17_marginW12 = 15.17911 if districtW12 == 10851
replace GB17_marginW12 = 22.22038 if districtW12 == 10852
replace GB17_marginW12 = 37.1618 if districtW12 == 10853
replace GB17_marginW12 = 18.03807 if districtW12 == 10854
replace GB17_marginW12 = 28.14146 if districtW12 == 10855
replace GB17_marginW12 = 18.35414 if districtW12 == 10856
replace GB17_marginW12 = 38.5881 if districtW12 == 10857
replace GB17_marginW12 = 24.81463 if districtW12 == 10858
replace GB17_marginW12 = 28.24773 if districtW12 == 10859
replace GB17_marginW12 = 42.59673 if districtW12 == 10860
replace GB17_marginW12 = 1.998612 if districtW12 == 10861
replace GB17_marginW12 = 2.824488 if districtW12 == 10862
replace GB17_marginW12 = 1.104695 if districtW12 == 10863
replace GB17_marginW12 = 30.36663 if districtW12 == 10864
replace GB17_marginW12 = 49.8131 if districtW12 == 10865
replace GB17_marginW12 = 29.12394 if districtW12 == 10866
replace GB17_marginW12 = 31.50284 if districtW12 == 10867
replace GB17_marginW12 = 10.28719 if districtW12 == 10868
replace GB17_marginW12 = 32.19267 if districtW12 == 10869
replace GB17_marginW12 = 17.39482 if districtW12 == 10870
replace GB17_marginW12 = 37.56006 if districtW12 == 10871
replace GB17_marginW12 = 38.56642 if districtW12 == 10872
replace GB17_marginW12 = 43.20173 if districtW12 == 10873
replace GB17_marginW12 = 1.359549 if districtW12 == 10874
replace GB17_marginW12 = 2.851474 if districtW12 == 10875
replace GB17_marginW12 = 2.655313 if districtW12 == 10876
replace GB17_marginW12 = 34.23714 if districtW12 == 10877
replace GB17_marginW12 = 1.271525 if districtW12 == 10878
replace GB17_marginW12 = 11.05093 if districtW12 == 10879
replace GB17_marginW12 = 13.29285 if districtW12 == 10880
replace GB17_marginW12 = 28.50351 if districtW12 == 10881
replace GB17_marginW12 = 47.11803 if districtW12 == 10882
replace GB17_marginW12 = 21.10782 if districtW12 == 10883
replace GB17_marginW12 = 3.486961 if districtW12 == 10884
replace GB17_marginW12 = 44.16945 if districtW12 == 10885
replace GB17_marginW12 = .6134301 if districtW12 == 10886
replace GB17_marginW12 = 3.313857 if districtW12 == 10887
replace GB17_marginW12 = 42.38743 if districtW12 == 10888
replace GB17_marginW12 = 6.786993 if districtW12 == 10889
replace GB17_marginW12 = 5.55577 if districtW12 == 10890
replace GB17_marginW12 = 22.28618 if districtW12 == 10891
replace GB17_marginW12 = 16.28874 if districtW12 == 10892
replace GB17_marginW12 = 32.72578 if districtW12 == 10893
replace GB17_marginW12 = 23.91123 if districtW12 == 10894
replace GB17_marginW12 = 40.53111 if districtW12 == 10895
replace GB17_marginW12 = .0710577 if districtW12 == 10896
replace GB17_marginW12 = 29.61194 if districtW12 == 10897
replace GB17_marginW12 = 18.3191 if districtW12 == 10898
replace GB17_marginW12 = 11.7423 if districtW12 == 10899
replace GB17_marginW12 = 27.5869 if districtW12 == 10900
replace GB17_marginW12 = 35.99984 if districtW12 == 10901
replace GB17_marginW12 = 6.411996 if districtW12 == 10902
replace GB17_marginW12 = 7.844326 if districtW12 == 10903
replace GB17_marginW12 = 30.02663 if districtW12 == 10904
replace GB17_marginW12 = 15.99657 if districtW12 == 10905
replace GB17_marginW12 = 26.1886 if districtW12 == 10906
replace GB17_marginW12 = 34.97452 if districtW12 == 10907
replace GB17_marginW12 = 13.73669 if districtW12 == 10908
replace GB17_marginW12 = 40.13271 if districtW12 == 10909
replace GB17_marginW12 = 40.98767 if districtW12 == 10910
replace GB17_marginW12 = 40.17724 if districtW12 == 10911
replace GB17_marginW12 = 32.51299 if districtW12 == 10912
replace GB17_marginW12 = 6.808856 if districtW12 == 10913
replace GB17_marginW12 = 8.534402 if districtW12 == 10914
replace GB17_marginW12 = 14.56805 if districtW12 == 10915
replace GB17_marginW12 = 29.98906 if districtW12 == 10916
replace GB17_marginW12 = 24.55953 if districtW12 == 10917
replace GB17_marginW12 = 42.7916 if districtW12 == 10918
replace GB17_marginW12 = 57.95684 if districtW12 == 10919
replace GB17_marginW12 = 27.06212 if districtW12 == 10920
replace GB17_marginW12 = 45.72008 if districtW12 == 10921
replace GB17_marginW12 = 3.726763 if districtW12 == 10922
replace GB17_marginW12 = 31.26667 if districtW12 == 10923
replace GB17_marginW12 = 9.74065 if districtW12 == 10924
replace GB17_marginW12 = 8.766741 if districtW12 == 10925
replace GB17_marginW12 = 11.38601 if districtW12 == 10926
replace GB17_marginW12 = 29.59972 if districtW12 == 10927
replace GB17_marginW12 = 34.37511 if districtW12 == 10928
replace GB17_marginW12 = 38.35585 if districtW12 == 10929
replace GB17_marginW12 = 31.30675 if districtW12 == 10930
replace GB17_marginW12 = 36.24973 if districtW12 == 10931
replace GB17_marginW12 = 35.85112 if districtW12 == 10932
replace GB17_marginW12 = 24.38455 if districtW12 == 10933
replace GB17_marginW12 = 24.57026 if districtW12 == 10934
replace GB17_marginW12 = 22.74325 if districtW12 == 10935
replace GB17_marginW12 = 22.53112 if districtW12 == 10936
replace GB17_marginW12 = 25.6468 if districtW12 == 10937
replace GB17_marginW12 = 32.77281 if districtW12 == 10938
replace GB17_marginW12 = 49.48226 if districtW12 == 10939
replace GB17_marginW12 = 32.86529 if districtW12 == 10940
replace GB17_marginW12 = 27.29132 if districtW12 == 10941
replace GB17_marginW12 = 35.13955 if districtW12 == 10942
replace GB17_marginW12 = 13.53357 if districtW12 == 10943
replace GB17_marginW12 = 35.58324 if districtW12 == 10944
replace GB17_marginW12 = 44.47945 if districtW12 == 10945
replace GB17_marginW12 = 32.7261 if districtW12 == 10946
replace GB17_marginW12 = 4.805836 if districtW12 == 10947
replace GB17_marginW12 = 12.83742 if districtW12 == 10948
replace GB17_marginW12 = 25.46598 if districtW12 == 10949
replace GB17_marginW12 = 29.92225 if districtW12 == 10950
replace GB17_marginW12 = 32.23254 if districtW12 == 10951
replace GB17_marginW12 = 34.93589 if districtW12 == 10952
replace GB17_marginW12 = 35.7261 if districtW12 == 10953
replace GB17_marginW12 = 33.47153 if districtW12 == 10954
replace GB17_marginW12 = .0662625 if districtW12 == 10955
replace GB17_marginW12 = 24.52509 if districtW12 == 10956
replace GB17_marginW12 = 21.19048 if districtW12 == 10957
replace GB17_marginW12 = 6.076402 if districtW12 == 10958
replace GB17_marginW12 = 26.78838 if districtW12 == 10959
replace GB17_marginW12 = 10.71792 if districtW12 == 10960
replace GB17_marginW12 = 20.55264 if districtW12 == 10961
replace GB17_marginW12 = 36.64928 if districtW12 == 10962
replace GB17_marginW12 = 46.02919 if districtW12 == 10963
replace GB17_marginW12 = .6090641 if districtW12 == 10964
replace GB17_marginW12 = 14.88521 if districtW12 == 10965
replace GB17_marginW12 = 24.2526 if districtW12 == 10966
replace GB17_marginW12 = 19.04045 if districtW12 == 10967
replace GB17_marginW12 = 6.864393 if districtW12 == 10968
replace GB17_marginW12 = 34.84739 if districtW12 == 10969
replace GB17_marginW12 = 20.39503 if districtW12 == 10970
replace GB17_marginW12 = 1.649824 if districtW12 == 10971
replace GB17_marginW12 = 11.75743 if districtW12 == 10972
replace GB17_marginW12 = 5.645433 if districtW12 == 10973
replace GB17_marginW12 = 1.590309 if districtW12 == 10974
replace GB17_marginW12 = 34.96762 if districtW12 == 10975
replace GB17_marginW12 = 16.23846 if districtW12 == 10976
replace GB17_marginW12 = 41.01846 if districtW12 == 10977
replace GB17_marginW12 = 47.10995 if districtW12 == 10978
replace GB17_marginW12 = 39.26003 if districtW12 == 10979
replace GB17_marginW12 = 1.076531 if districtW12 == 10980
replace GB17_marginW12 = 27.57172 if districtW12 == 10981
replace GB17_marginW12 = 22.16089 if districtW12 == 10982
replace GB17_marginW12 = 43.13756 if districtW12 == 10983
replace GB17_marginW12 = 24.43333 if districtW12 == 10984
replace GB17_marginW12 = 29.01926 if districtW12 == 10985
replace GB17_marginW12 = 26.20887 if districtW12 == 10986
replace GB17_marginW12 = 30.10628 if districtW12 == 10987
replace GB17_marginW12 = 25.19627 if districtW12 == 10988
replace GB17_marginW12 = 1.611242 if districtW12 == 10989
replace GB17_marginW12 = 38.20662 if districtW12 == 10990
replace GB17_marginW12 = 42.71046 if districtW12 == 10991
replace GB17_marginW12 = 19.31224 if districtW12 == 10992
replace GB17_marginW12 = 33.97343 if districtW12 == 10993
replace GB17_marginW12 = 23.81337 if districtW12 == 10994
replace GB17_marginW12 = .6855428 if districtW12 == 10995
replace GB17_marginW12 = 34.2489 if districtW12 == 10996
replace GB17_marginW12 = 41.3095 if districtW12 == 10997
replace GB17_marginW12 = 26.57338 if districtW12 == 10998
replace GB17_marginW12 = 27.91066 if districtW12 == 10999
replace GB17_marginW12 = 34.77808 if districtW12 == 11000
replace GB17_marginW12 = 26.80923 if districtW12 == 11001
replace GB17_marginW12 = 70.09465 if districtW12 == 11002
replace GB17_marginW12 = 6.694088 if districtW12 == 11003
replace GB17_marginW12 = 30.37319 if districtW12 == 11004
replace GB17_marginW12 = 14.7262 if districtW12 == 11005
replace GB17_marginW12 = 20.51778 if districtW12 == 11006
replace GB17_marginW12 = 10.78083 if districtW12 == 11007
replace GB17_marginW12 = 36.79009 if districtW12 == 11008
replace GB17_marginW12 = 4.701409 if districtW12 == 11009
replace GB17_marginW12 = 48.22865 if districtW12 == 11010
replace GB17_marginW12 = 6.823549 if districtW12 == 11011
replace GB17_marginW12 = 20.17608 if districtW12 == 11012
replace GB17_marginW12 = 66.50395 if districtW12 == 11013
replace GB17_marginW12 = 24.57955 if districtW12 == 11014
replace GB17_marginW12 = 27.32619 if districtW12 == 11015
replace GB17_marginW12 = 40.99637 if districtW12 == 11016
replace GB17_marginW12 = 19.74978 if districtW12 == 11017
replace GB17_marginW12 = 4.111621 if districtW12 == 11018
replace GB17_marginW12 = 2.231061 if districtW12 == 11019
replace GB17_marginW12 = 31.89235 if districtW12 == 11020
replace GB17_marginW12 = 3.569355 if districtW12 == 11021
replace GB17_marginW12 = 17.4944 if districtW12 == 11022
replace GB17_marginW12 = 39.0778 if districtW12 == 11023
replace GB17_marginW12 = 7.760849 if districtW12 == 11024
replace GB17_marginW12 = 23.40346 if districtW12 == 11025
replace GB17_marginW12 = 12.46158 if districtW12 == 11026
replace GB17_marginW12 = 14.26194 if districtW12 == 11027
replace GB17_marginW12 = 33.68376 if districtW12 == 11028
replace GB17_marginW12 = 19.72736 if districtW12 == 11029
replace GB17_marginW12 = 12.35663 if districtW12 == 11030
replace GB17_marginW12 = 32.03296 if districtW12 == 11031
replace GB17_marginW12 = 60.54227 if districtW12 == 11032
replace GB17_marginW12 = 21.49148 if districtW12 == 11033
replace GB17_marginW12 = 32.97453 if districtW12 == 11034
replace GB17_marginW12 = 37.76806 if districtW12 == 11035
replace GB17_marginW12 = 26.58968 if districtW12 == 11036
replace GB17_marginW12 = 1.50328 if districtW12 == 11037
replace GB17_marginW12 = 20.46264 if districtW12 == 11038
replace GB17_marginW12 = 33.71124 if districtW12 == 11039
replace GB17_marginW12 = 10.911 if districtW12 == 11040
replace GB17_marginW12 = 17.49422 if districtW12 == 11041
replace GB17_marginW12 = 41.51258 if districtW12 == 11042
replace GB17_marginW12 = 18.41575 if districtW12 == 11043
replace GB17_marginW12 = 12.20677 if districtW12 == 11044
replace GB17_marginW12 = 37.86682 if districtW12 == 11045
replace GB17_marginW12 = 34.86303 if districtW12 == 11046
replace GB17_marginW12 = 30.27187 if districtW12 == 11047
replace GB17_marginW12 = 31.49271 if districtW12 == 11048
replace GB17_marginW12 = 12.56437 if districtW12 == 11049
replace GB17_marginW12 = 23.45196 if districtW12 == 11050
replace GB17_marginW12 = 5.159873 if districtW12 == 11051
replace GB17_marginW12 = 4.877195 if districtW12 == 11052
replace GB17_marginW12 = 9.417892 if districtW12 == 11053
replace GB17_marginW12 = 18.35809 if districtW12 == 11054
replace GB17_marginW12 = 22.18226 if districtW12 == 11055
replace GB17_marginW12 = 12.29694 if districtW12 == 11056
replace GB17_marginW12 = 23.26103 if districtW12 == 11057
replace GB17_marginW12 = 26.07913 if districtW12 == 11058
replace GB17_marginW12 = 32.59608 if districtW12 == 11059
replace GB17_marginW12 = 24.78452 if districtW12 == 11060
replace GB17_marginW12 = 34.98908 if districtW12 == 11061
replace GB17_marginW12 = 14.43397 if districtW12 == 11062
replace GB17_marginW12 = 19.75751 if districtW12 == 40001
replace GB17_marginW12 = 4.530215 if districtW12 == 40002
replace GB17_marginW12 = 4.566982 if districtW12 == 40003
replace GB17_marginW12 = 53.28674 if districtW12 == 40004
replace GB17_marginW12 = 41.74554 if districtW12 == 40005
replace GB17_marginW12 = 21.55009 if districtW12 == 40006
replace GB17_marginW12 = 1.636097 if districtW12 == 40007
replace GB17_marginW12 = .3676713 if districtW12 == 40008
replace GB17_marginW12 = 42.80149 if districtW12 == 40009
replace GB17_marginW12 = 27.60526 if districtW12 == 40010
replace GB17_marginW12 = 23.30951 if districtW12 == 40011
replace GB17_marginW12 = 42.59801 if districtW12 == 40012
replace GB17_marginW12 = 3.082812 if districtW12 == 40013
replace GB17_marginW12 = 7.431087 if districtW12 == 40014
replace GB17_marginW12 = 4.806161 if districtW12 == 40015
replace GB17_marginW12 = 47.33799 if districtW12 == 40016
replace GB17_marginW12 = 15.59171 if districtW12 == 40017
replace GB17_marginW12 = 23.78237 if districtW12 == 40018
replace GB17_marginW12 = 11.26044 if districtW12 == 20001
replace GB17_marginW12 = 10.68033 if districtW12 == 20002
replace GB17_marginW12 = .5131304 if districtW12 == 20003
replace GB17_marginW12 = 6.58091 if districtW12 == 20004
replace GB17_marginW12 = 2.762696 if districtW12 == 20005
replace GB17_marginW12 = 6.00147 if districtW12 == 20006
replace GB17_marginW12 = 8.868238 if districtW12 == 20007
replace GB17_marginW12 = 21.12017 if districtW12 == 20008
replace GB17_marginW12 = 6.614673 if districtW12 == 20009
replace GB17_marginW12 = 2.810123 if districtW12 == 20010
replace GB17_marginW12 = 3.521314 if districtW12 == 20011
replace GB17_marginW12 = 9.72783 if districtW12 == 20012
replace GB17_marginW12 = 10.93626 if districtW12 == 20013
replace GB17_marginW12 = 19.28151 if districtW12 == 20014
replace GB17_marginW12 = 15.47941 if districtW12 == 20015
replace GB17_marginW12 = 13.60498 if districtW12 == 20016
replace GB17_marginW12 = 1.654577 if districtW12 == 20017
replace GB17_marginW12 = 10.30675 if districtW12 == 20018
replace GB17_marginW12 = 7.145762 if districtW12 == 20019
replace GB17_marginW12 = 5.517375 if districtW12 == 20020
replace GB17_marginW12 = 8.768469 if districtW12 == 20021
replace GB17_marginW12 = 7.869401 if districtW12 == 20022
replace GB17_marginW12 = 2.873462 if districtW12 == 20023
replace GB17_marginW12 = 32.42893 if districtW12 == 20024
replace GB17_marginW12 = 2.221096 if districtW12 == 20025
replace GB17_marginW12 = 5.659628 if districtW12 == 20026
replace GB17_marginW12 = 6.795791 if districtW12 == 20027
replace GB17_marginW12 = 9.149027 if districtW12 == 20028
replace GB17_marginW12 = 6.300023 if districtW12 == 20029
replace GB17_marginW12 = .2073765 if districtW12 == 20030
replace GB17_marginW12 = 3.166732 if districtW12 == 20031
replace GB17_marginW12 = .7616073 if districtW12 == 20032
replace GB17_marginW12 = 6.59304 if districtW12 == 20033
replace GB17_marginW12 = 4.549944 if districtW12 == 20034
replace GB17_marginW12 = .1695961 if districtW12 == 20035
replace GB17_marginW12 = 8.086833 if districtW12 == 20036
replace GB17_marginW12 = 4.856104 if districtW12 == 20037
replace GB17_marginW12 = .9822726 if districtW12 == 20038
replace GB17_marginW12 = 9.325579 if districtW12 == 20039
replace GB17_marginW12 = 13.47911 if districtW12 == 20040
replace GB17_marginW12 = .560689 if districtW12 == 20041
replace GB17_marginW12 = .5270451 if districtW12 == 20042
replace GB17_marginW12 = 5.203766 if districtW12 == 20043
replace GB17_marginW12 = 7.385963 if districtW12 == 20044
replace GB17_marginW12 = 1.954806 if districtW12 == 20045
replace GB17_marginW12 = 8.736476 if districtW12 == 20046
replace GB17_marginW12 = .758478 if districtW12 == 20047
replace GB17_marginW12 = 7.659224 if districtW12 == 20048
replace GB17_marginW12 = .0047833 if districtW12 == 20049
replace GB17_marginW12 = 6.201079 if districtW12 == 20050
replace GB17_marginW12 = 19.60304 if districtW12 == 20051
replace GB17_marginW12 = 5.605492 if districtW12 == 20052
replace GB17_marginW12 = 6.091774 if districtW12 == 20053
replace GB17_marginW12 = .0407577 if districtW12 == 20054
replace GB17_marginW12 = 15.39242 if districtW12 == 20055
replace GB17_marginW12 = .5209148 if districtW12 == 20056
replace GB17_marginW12 = .299862 if districtW12 == 20057
replace GB17_marginW12 = 15.39952 if districtW12 == 20058
replace GB17_marginW12 = 5.190208 if districtW12 == 20059
replace GB17_marginW12 = 14.07391 if districtW12 == 30041
replace GB17_marginW12 = 10.7565 if districtW12 == 30042
replace GB17_marginW12 = 11.69571 if districtW12 == 30043
replace GB17_marginW12 = 5.220562 if districtW12 == 30044
replace GB17_marginW12 = 29.80517 if districtW12 == 30045
replace GB17_marginW12 = 7.172635 if districtW12 == 30046
replace GB17_marginW12 = 28.42659 if districtW12 == 30047
replace GB17_marginW12 = 37.45271 if districtW12 == 30048
replace GB17_marginW12 = 50.38175 if districtW12 == 30049
replace GB17_marginW12 = 42.59915 if districtW12 == 30050
replace GB17_marginW12 = 8.023527 if districtW12 == 30051
replace GB17_marginW12 = 41.73549 if districtW12 == 30052
replace GB17_marginW12 = 26.64654 if districtW12 == 30053
replace GB17_marginW12 = 16.49977 if districtW12 == 30054
replace GB17_marginW12 = 21.73547 if districtW12 == 30055
replace GB17_marginW12 = 13.02547 if districtW12 == 30056
replace GB17_marginW12 = .3261477 if districtW12 == 30057
replace GB17_marginW12 = 1.975116 if districtW12 == 30058
replace GB17_marginW12 = 8.454272 if districtW12 == 30059
replace GB17_marginW12 = 6.149831 if districtW12 == 30060
replace GB17_marginW12 = 15.98128 if districtW12 == 30061
replace GB17_marginW12 = 11.62406 if districtW12 == 30062
replace GB17_marginW12 = 26.61145 if districtW12 == 30063
replace GB17_marginW12 = .2615243 if districtW12 == 30064
replace GB17_marginW12 = .7441282 if districtW12 == 30065
replace GB17_marginW12 = 7.365129 if districtW12 == 30066
replace GB17_marginW12 = 9.524971 if districtW12 == 30067
replace GB17_marginW12 = 19.44646 if districtW12 == 30068
replace GB17_marginW12 = 32.99203 if districtW12 == 30069
replace GB17_marginW12 = 41.62631 if districtW12 == 30070
replace GB17_marginW12 = 48.6928 if districtW12 == 30071
replace GB17_marginW12 = 36.76816 if districtW12 == 30072
replace GB17_marginW12 = 10.8658 if districtW12 == 30073
replace GB17_marginW12 = 37.28363 if districtW12 == 30074
replace GB17_marginW12 = 28.69604 if districtW12 == 30075
replace GB17_marginW12 = 29.24667 if districtW12 == 30076
replace GB17_marginW12 = 31.61832 if districtW12 == 30077
replace GB17_marginW12 = 4.076844 if districtW12 == 30078
replace GB17_marginW12 = 26.91673 if districtW12 == 30079
replace GB17_marginW12 = 29.29675 if districtW12 == 30080

* Effective number of electoral parties

gen GB17_enepW11 = .

replace GB17_enepW11 = 2.436347 if districtW11 == 10530
replace GB17_enepW11 = 1.929627 if districtW11 == 10531
replace GB17_enepW11 = 2.395331 if districtW11 == 10532
replace GB17_enepW11 = 2.13507 if districtW11 == 10533
replace GB17_enepW11 = 2.225745 if districtW11 == 10534
replace GB17_enepW11 = 2.736126 if districtW11 == 10535
replace GB17_enepW11 = 2.266248 if districtW11 == 10536
replace GB17_enepW11 = 2.131891 if districtW11 == 10537
replace GB17_enepW11 = 2.483196 if districtW11 == 10538
replace GB17_enepW11 = 2.410754 if districtW11 == 10539
replace GB17_enepW11 = 1.943977 if districtW11 == 10540
replace GB17_enepW11 = 2.107423 if districtW11 == 10541
replace GB17_enepW11 = 2.299328 if districtW11 == 10542
replace GB17_enepW11 = 2.233326 if districtW11 == 10543
replace GB17_enepW11 = 2.120211 if districtW11 == 10544
replace GB17_enepW11 = 2.430745 if districtW11 == 10545
replace GB17_enepW11 = 2.152648 if districtW11 == 10546
replace GB17_enepW11 = 2.67727 if districtW11 == 10547
replace GB17_enepW11 = 2.174806 if districtW11 == 10548
replace GB17_enepW11 = 2.558633 if districtW11 == 10549
replace GB17_enepW11 = 2.085435 if districtW11 == 10550
replace GB17_enepW11 = 2.224235 if districtW11 == 10551
replace GB17_enepW11 = 2.337414 if districtW11 == 10552
replace GB17_enepW11 = 2.517348 if districtW11 == 10553
replace GB17_enepW11 = 2.628381 if districtW11 == 10554
replace GB17_enepW11 = 1.853616 if districtW11 == 10555
replace GB17_enepW11 = 2.200783 if districtW11 == 10556
replace GB17_enepW11 = 2.21031 if districtW11 == 10557
replace GB17_enepW11 = 2.285161 if districtW11 == 10558
replace GB17_enepW11 = 1.598057 if districtW11 == 10559
replace GB17_enepW11 = 2.159324 if districtW11 == 10560
replace GB17_enepW11 = 2.066296 if districtW11 == 10561
replace GB17_enepW11 = 1.591108 if districtW11 == 10562
replace GB17_enepW11 = 1.474918 if districtW11 == 10563
replace GB17_enepW11 = 1.423479 if districtW11 == 10564
replace GB17_enepW11 = 2.145358 if districtW11 == 10565
replace GB17_enepW11 = 1.867602 if districtW11 == 10566
replace GB17_enepW11 = 2.001953 if districtW11 == 10567
replace GB17_enepW11 = 2.505523 if districtW11 == 10568
replace GB17_enepW11 = 2.209871 if districtW11 == 10569
replace GB17_enepW11 = 1.786995 if districtW11 == 10570
replace GB17_enepW11 = 1.83352 if districtW11 == 10571
replace GB17_enepW11 = 2.256202 if districtW11 == 10572
replace GB17_enepW11 = 2.270224 if districtW11 == 10573
replace GB17_enepW11 = 2.471116 if districtW11 == 10574
replace GB17_enepW11 = 2.198952 if districtW11 == 10575
replace GB17_enepW11 = 2.397166 if districtW11 == 10576
replace GB17_enepW11 = 2.288342 if districtW11 == 10577
replace GB17_enepW11 = 2.290913 if districtW11 == 10578
replace GB17_enepW11 = 2.170194 if districtW11 == 10579
replace GB17_enepW11 = 2.254186 if districtW11 == 10580
replace GB17_enepW11 = 1.386512 if districtW11 == 10581
replace GB17_enepW11 = 2.113118 if districtW11 == 10582
replace GB17_enepW11 = 2.438136 if districtW11 == 10583
replace GB17_enepW11 = 2.49214 if districtW11 == 10584
replace GB17_enepW11 = 2.367873 if districtW11 == 10585
replace GB17_enepW11 = 2.254371 if districtW11 == 10586
replace GB17_enepW11 = 2.098465 if districtW11 == 10587
replace GB17_enepW11 = 2.249257 if districtW11 == 10588
replace GB17_enepW11 = 2.146602 if districtW11 == 10589
replace GB17_enepW11 = 2.108207 if districtW11 == 10590
replace GB17_enepW11 = 1.74039 if districtW11 == 10591
replace GB17_enepW11 = 1.987585 if districtW11 == 10592
replace GB17_enepW11 = 2.112983 if districtW11 == 10593
replace GB17_enepW11 = 2.069875 if districtW11 == 10594
replace GB17_enepW11 = 2.506666 if districtW11 == 10595
replace GB17_enepW11 = 2.103496 if districtW11 == 10596
replace GB17_enepW11 = 2.050606 if districtW11 == 10597
replace GB17_enepW11 = 2.618217 if districtW11 == 10598
replace GB17_enepW11 = 2.049175 if districtW11 == 10599
replace GB17_enepW11 = 2.299259 if districtW11 == 10600
replace GB17_enepW11 = 2.185131 if districtW11 == 10601
replace GB17_enepW11 = 2.10271 if districtW11 == 10602
replace GB17_enepW11 = 2.323001 if districtW11 == 10603
replace GB17_enepW11 = 2.442998 if districtW11 == 10604
replace GB17_enepW11 = 2.063022 if districtW11 == 10605
replace GB17_enepW11 = 2.115127 if districtW11 == 10606
replace GB17_enepW11 = 2.345166 if districtW11 == 10607
replace GB17_enepW11 = 2.136163 if districtW11 == 10608
replace GB17_enepW11 = 2.934103 if districtW11 == 10609
replace GB17_enepW11 = 2.082243 if districtW11 == 10610
replace GB17_enepW11 = 2.058986 if districtW11 == 10611
replace GB17_enepW11 = 2.184301 if districtW11 == 10612
replace GB17_enepW11 = 2.258507 if districtW11 == 10613
replace GB17_enepW11 = 2.389285 if districtW11 == 10614
replace GB17_enepW11 = 1.597481 if districtW11 == 10615
replace GB17_enepW11 = 2.352654 if districtW11 == 10616
replace GB17_enepW11 = 2.616123 if districtW11 == 10617
replace GB17_enepW11 = 2.248156 if districtW11 == 10618
replace GB17_enepW11 = 2.442693 if districtW11 == 10619
replace GB17_enepW11 = 2.25819 if districtW11 == 10620
replace GB17_enepW11 = 2.862654 if districtW11 == 10621
replace GB17_enepW11 = 1.927912 if districtW11 == 10622
replace GB17_enepW11 = 2.62936 if districtW11 == 10623
replace GB17_enepW11 = 2.204537 if districtW11 == 10624
replace GB17_enepW11 = 2.165502 if districtW11 == 10625
replace GB17_enepW11 = 2.263731 if districtW11 == 10626
replace GB17_enepW11 = 2.723454 if districtW11 == 10627
replace GB17_enepW11 = 2.544933 if districtW11 == 10628
replace GB17_enepW11 = 2.499705 if districtW11 == 10629
replace GB17_enepW11 = 2.468564 if districtW11 == 10630
replace GB17_enepW11 = 2.331837 if districtW11 == 10631
replace GB17_enepW11 = 2.349838 if districtW11 == 10632
replace GB17_enepW11 = 2.345891 if districtW11 == 10633
replace GB17_enepW11 = 2.287569 if districtW11 == 10634
replace GB17_enepW11 = 2.477007 if districtW11 == 10635
replace GB17_enepW11 = 2.34148 if districtW11 == 10636
replace GB17_enepW11 = 2.082061 if districtW11 == 10637
replace GB17_enepW11 = 1.884799 if districtW11 == 10638
replace GB17_enepW11 = 2.649009 if districtW11 == 10639
replace GB17_enepW11 = 2.053942 if districtW11 == 10640
replace GB17_enepW11 = 2.459959 if districtW11 == 10641
replace GB17_enepW11 = 2.242338 if districtW11 == 10642
replace GB17_enepW11 = 2.204614 if districtW11 == 10643
replace GB17_enepW11 = 2.747585 if districtW11 == 10644
replace GB17_enepW11 = 2.258785 if districtW11 == 10645
replace GB17_enepW11 = 2.269391 if districtW11 == 10646
replace GB17_enepW11 = 2.242152 if districtW11 == 10647
replace GB17_enepW11 = 2.252852 if districtW11 == 10648
replace GB17_enepW11 = 2.02651 if districtW11 == 10649
replace GB17_enepW11 = 2.334428 if districtW11 == 10650
replace GB17_enepW11 = 2.222883 if districtW11 == 10651
replace GB17_enepW11 = 2.146238 if districtW11 == 10652
replace GB17_enepW11 = 2.247322 if districtW11 == 10653
replace GB17_enepW11 = 2.199705 if districtW11 == 10654
replace GB17_enepW11 = 1.693239 if districtW11 == 10655
replace GB17_enepW11 = 2.334919 if districtW11 == 10656
replace GB17_enepW11 = 2.406503 if districtW11 == 10657
replace GB17_enepW11 = 2.247831 if districtW11 == 10658
replace GB17_enepW11 = 2.247658 if districtW11 == 10659
replace GB17_enepW11 = 2.114228 if districtW11 == 10660
replace GB17_enepW11 = 2.06279 if districtW11 == 10661
replace GB17_enepW11 = 2.296903 if districtW11 == 10662
replace GB17_enepW11 = 2.195803 if districtW11 == 10663
replace GB17_enepW11 = 2.168361 if districtW11 == 10664
replace GB17_enepW11 = 2.229861 if districtW11 == 10665
replace GB17_enepW11 = 2.156484 if districtW11 == 10666
replace GB17_enepW11 = 2.193398 if districtW11 == 10667
replace GB17_enepW11 = 2.19556 if districtW11 == 10668
replace GB17_enepW11 = 2.219979 if districtW11 == 10669
replace GB17_enepW11 = 2.293195 if districtW11 == 10670
replace GB17_enepW11 = 2.29918 if districtW11 == 10671
replace GB17_enepW11 = 2.209938 if districtW11 == 10672
replace GB17_enepW11 = 1.887205 if districtW11 == 10673
replace GB17_enepW11 = 2.082514 if districtW11 == 10674
replace GB17_enepW11 = 1.934205 if districtW11 == 10675
replace GB17_enepW11 = 1.846187 if districtW11 == 10676
replace GB17_enepW11 = 2.156631 if districtW11 == 10677
replace GB17_enepW11 = 2.677104 if districtW11 == 10678
replace GB17_enepW11 = 1.410199 if districtW11 == 10679
replace GB17_enepW11 = 2.183408 if districtW11 == 10680
replace GB17_enepW11 = 2.450915 if districtW11 == 10681
replace GB17_enepW11 = 2.51458 if districtW11 == 10682
replace GB17_enepW11 = 2.293841 if districtW11 == 10683
replace GB17_enepW11 = 2.375693 if districtW11 == 10684
replace GB17_enepW11 = 2.769017 if districtW11 == 10685
replace GB17_enepW11 = 2.271405 if districtW11 == 10686
replace GB17_enepW11 = 1.768484 if districtW11 == 10687
replace GB17_enepW11 = 2.057268 if districtW11 == 10688
replace GB17_enepW11 = 2.266949 if districtW11 == 10689
replace GB17_enepW11 = 2.15457 if districtW11 == 10690
replace GB17_enepW11 = 2.110473 if districtW11 == 10691
replace GB17_enepW11 = 2.21483 if districtW11 == 10692
replace GB17_enepW11 = 2.188978 if districtW11 == 10693
replace GB17_enepW11 = 2.303423 if districtW11 == 10694
replace GB17_enepW11 = 2.186712 if districtW11 == 10695
replace GB17_enepW11 = 2.194478 if districtW11 == 10696
replace GB17_enepW11 = 2.421993 if districtW11 == 10697
replace GB17_enepW11 = 2.028284 if districtW11 == 10698
replace GB17_enepW11 = 2.145119 if districtW11 == 10699
replace GB17_enepW11 = 2.23482 if districtW11 == 10700
replace GB17_enepW11 = 2.093927 if districtW11 == 10701
replace GB17_enepW11 = 2.336972 if districtW11 == 10702
replace GB17_enepW11 = 2.397725 if districtW11 == 10703
replace GB17_enepW11 = 2.568903 if districtW11 == 10704
replace GB17_enepW11 = 2.345302 if districtW11 == 10705
replace GB17_enepW11 = 2.169219 if districtW11 == 10706
replace GB17_enepW11 = 2.126892 if districtW11 == 10707
replace GB17_enepW11 = 1.571101 if districtW11 == 10708
replace GB17_enepW11 = 2.055956 if districtW11 == 10709
replace GB17_enepW11 = 2.202323 if districtW11 == 10710
replace GB17_enepW11 = 2.269177 if districtW11 == 10711
replace GB17_enepW11 = 2.394747 if districtW11 == 10712
replace GB17_enepW11 = 2.167653 if districtW11 == 10713
replace GB17_enepW11 = 2.178281 if districtW11 == 10714
replace GB17_enepW11 = 2.250031 if districtW11 == 10715
replace GB17_enepW11 = 2.353957 if districtW11 == 10716
replace GB17_enepW11 = 2.337036 if districtW11 == 10717
replace GB17_enepW11 = 2.058807 if districtW11 == 10718
replace GB17_enepW11 = 2.554824 if districtW11 == 10719
replace GB17_enepW11 = 1.705329 if districtW11 == 10720
replace GB17_enepW11 = 1.545417 if districtW11 == 10721
replace GB17_enepW11 = 2.315912 if districtW11 == 10722
replace GB17_enepW11 = 2.199758 if districtW11 == 10723
replace GB17_enepW11 = 2.125204 if districtW11 == 10724
replace GB17_enepW11 = 1.724221 if districtW11 == 10725
replace GB17_enepW11 = 2.038373 if districtW11 == 10726
replace GB17_enepW11 = 2.183266 if districtW11 == 10727
replace GB17_enepW11 = 2.596301 if districtW11 == 10728
replace GB17_enepW11 = 2.266181 if districtW11 == 10729
replace GB17_enepW11 = 2.480128 if districtW11 == 10730
replace GB17_enepW11 = 2.189401 if districtW11 == 10731
replace GB17_enepW11 = 2.042799 if districtW11 == 10732
replace GB17_enepW11 = 2.460599 if districtW11 == 10733
replace GB17_enepW11 = 2.275751 if districtW11 == 10734
replace GB17_enepW11 = 2.296636 if districtW11 == 10735
replace GB17_enepW11 = 2.338022 if districtW11 == 10736
replace GB17_enepW11 = 1.90392 if districtW11 == 10737
replace GB17_enepW11 = 2.802327 if districtW11 == 10738
replace GB17_enepW11 = 2.260312 if districtW11 == 10739
replace GB17_enepW11 = 2.310271 if districtW11 == 10740
replace GB17_enepW11 = 2.253618 if districtW11 == 10741
replace GB17_enepW11 = 2.420112 if districtW11 == 10742
replace GB17_enepW11 = 2.772133 if districtW11 == 10743
replace GB17_enepW11 = 2.207818 if districtW11 == 10744
replace GB17_enepW11 = 2.175702 if districtW11 == 10745
replace GB17_enepW11 = 2.41048 if districtW11 == 10746
replace GB17_enepW11 = 2.307497 if districtW11 == 10747
replace GB17_enepW11 = 2.197546 if districtW11 == 10748
replace GB17_enepW11 = 2.502328 if districtW11 == 10749
replace GB17_enepW11 = 1.884244 if districtW11 == 10750
replace GB17_enepW11 = 2.225587 if districtW11 == 10751
replace GB17_enepW11 = 2.100967 if districtW11 == 10752
replace GB17_enepW11 = 2.391636 if districtW11 == 10753
replace GB17_enepW11 = 2.241863 if districtW11 == 10754
replace GB17_enepW11 = 1.953533 if districtW11 == 10755
replace GB17_enepW11 = 2.103918 if districtW11 == 10756
replace GB17_enepW11 = 2.450699 if districtW11 == 10757
replace GB17_enepW11 = 2.217661 if districtW11 == 10758
replace GB17_enepW11 = 2.037187 if districtW11 == 10759
replace GB17_enepW11 = 1.614721 if districtW11 == 10760
replace GB17_enepW11 = 2.297791 if districtW11 == 10761
replace GB17_enepW11 = 2.870981 if districtW11 == 10762
replace GB17_enepW11 = 1.791877 if districtW11 == 10763
replace GB17_enepW11 = 2.207464 if districtW11 == 10764
replace GB17_enepW11 = 2.038057 if districtW11 == 10765
replace GB17_enepW11 = 2.325471 if districtW11 == 10766
replace GB17_enepW11 = 2.246038 if districtW11 == 10767
replace GB17_enepW11 = 2.69072 if districtW11 == 10768
replace GB17_enepW11 = 2.124824 if districtW11 == 10769
replace GB17_enepW11 = 2.722802 if districtW11 == 10770
replace GB17_enepW11 = 2.296246 if districtW11 == 10771
replace GB17_enepW11 = 2.10367 if districtW11 == 10772
replace GB17_enepW11 = 2.634905 if districtW11 == 10773
replace GB17_enepW11 = 2.178488 if districtW11 == 10774
replace GB17_enepW11 = 1.355007 if districtW11 == 10775
replace GB17_enepW11 = 2.12947 if districtW11 == 10776
replace GB17_enepW11 = 1.861266 if districtW11 == 10777
replace GB17_enepW11 = 2.117027 if districtW11 == 10778
replace GB17_enepW11 = 2.016744 if districtW11 == 10779
replace GB17_enepW11 = 2.811337 if districtW11 == 10780
replace GB17_enepW11 = 2.080691 if districtW11 == 10781
replace GB17_enepW11 = 1.962568 if districtW11 == 10782
replace GB17_enepW11 = 1.698586 if districtW11 == 10783
replace GB17_enepW11 = 2.124819 if districtW11 == 10784
replace GB17_enepW11 = 2.231042 if districtW11 == 10785
replace GB17_enepW11 = 2.426609 if districtW11 == 10786
replace GB17_enepW11 = 1.933397 if districtW11 == 10787
replace GB17_enepW11 = 1.997207 if districtW11 == 10788
replace GB17_enepW11 = 1.623025 if districtW11 == 10789
replace GB17_enepW11 = 1.866358 if districtW11 == 10790
replace GB17_enepW11 = 2.039643 if districtW11 == 10791
replace GB17_enepW11 = 2.319609 if districtW11 == 10792
replace GB17_enepW11 = 1.37763 if districtW11 == 10793
replace GB17_enepW11 = 1.34488 if districtW11 == 10794
replace GB17_enepW11 = 1.534095 if districtW11 == 10795
replace GB17_enepW11 = 1.434758 if districtW11 == 10796
replace GB17_enepW11 = 2.336765 if districtW11 == 10797
replace GB17_enepW11 = 2.067765 if districtW11 == 10798
replace GB17_enepW11 = 2.143041 if districtW11 == 10799
replace GB17_enepW11 = 1.933441 if districtW11 == 10800
replace GB17_enepW11 = 2.021094 if districtW11 == 10801
replace GB17_enepW11 = 2.395431 if districtW11 == 10802
replace GB17_enepW11 = 2.127846 if districtW11 == 10803
replace GB17_enepW11 = 2.533548 if districtW11 == 10804
replace GB17_enepW11 = 2.15361 if districtW11 == 10805
replace GB17_enepW11 = 1.957887 if districtW11 == 10806
replace GB17_enepW11 = 1.608548 if districtW11 == 10807
replace GB17_enepW11 = 1.678817 if districtW11 == 10808
replace GB17_enepW11 = 1.817461 if districtW11 == 10809
replace GB17_enepW11 = 2.38518 if districtW11 == 10810
replace GB17_enepW11 = 2.088334 if districtW11 == 10811
replace GB17_enepW11 = 2.170118 if districtW11 == 10812
replace GB17_enepW11 = 2.147461 if districtW11 == 10813
replace GB17_enepW11 = 2.121616 if districtW11 == 10814
replace GB17_enepW11 = 2.25229 if districtW11 == 10815
replace GB17_enepW11 = 2.259021 if districtW11 == 10816
replace GB17_enepW11 = 2.475993 if districtW11 == 10817
replace GB17_enepW11 = 2.064548 if districtW11 == 10818
replace GB17_enepW11 = 1.980368 if districtW11 == 10819
replace GB17_enepW11 = 2.114126 if districtW11 == 10820
replace GB17_enepW11 = 2.351556 if districtW11 == 10821
replace GB17_enepW11 = 2.32991 if districtW11 == 10822
replace GB17_enepW11 = 1.880203 if districtW11 == 10823
replace GB17_enepW11 = 2.270447 if districtW11 == 10824
replace GB17_enepW11 = 2.33158 if districtW11 == 10825
replace GB17_enepW11 = 2.101607 if districtW11 == 10826
replace GB17_enepW11 = 2.198815 if districtW11 == 10827
replace GB17_enepW11 = 2.01822 if districtW11 == 10828
replace GB17_enepW11 = 2.065648 if districtW11 == 10829
replace GB17_enepW11 = 2.251496 if districtW11 == 10830
replace GB17_enepW11 = 2.057743 if districtW11 == 10831
replace GB17_enepW11 = 1.973052 if districtW11 == 10832
replace GB17_enepW11 = 2.34884 if districtW11 == 10833
replace GB17_enepW11 = 2.150462 if districtW11 == 10834
replace GB17_enepW11 = 2.503931 if districtW11 == 10835
replace GB17_enepW11 = 2.227216 if districtW11 == 10836
replace GB17_enepW11 = 2.465604 if districtW11 == 10837
replace GB17_enepW11 = 2.694124 if districtW11 == 10838
replace GB17_enepW11 = 2.103961 if districtW11 == 10839
replace GB17_enepW11 = 2.204533 if districtW11 == 10840
replace GB17_enepW11 = 2.188351 if districtW11 == 10841
replace GB17_enepW11 = 2.085183 if districtW11 == 10842
replace GB17_enepW11 = 2.308006 if districtW11 == 10843
replace GB17_enepW11 = 2.105466 if districtW11 == 10844
replace GB17_enepW11 = 2.310302 if districtW11 == 10845
replace GB17_enepW11 = 2.405492 if districtW11 == 10846
replace GB17_enepW11 = 2.28921 if districtW11 == 10847
replace GB17_enepW11 = 2.393573 if districtW11 == 10848
replace GB17_enepW11 = 2.143306 if districtW11 == 10849
replace GB17_enepW11 = 2.638262 if districtW11 == 10850
replace GB17_enepW11 = 2.287277 if districtW11 == 10851
replace GB17_enepW11 = 2.299315 if districtW11 == 10852
replace GB17_enepW11 = 2.028852 if districtW11 == 10853
replace GB17_enepW11 = 2.099535 if districtW11 == 10854
replace GB17_enepW11 = 2.265543 if districtW11 == 10855
replace GB17_enepW11 = 2.468049 if districtW11 == 10856
replace GB17_enepW11 = 2.218655 if districtW11 == 10857
replace GB17_enepW11 = 2.200625 if districtW11 == 10858
replace GB17_enepW11 = 2.138994 if districtW11 == 10859
replace GB17_enepW11 = 2.34342 if districtW11 == 10860
replace GB17_enepW11 = 2.328338 if districtW11 == 10861
replace GB17_enepW11 = 2.40012 if districtW11 == 10862
replace GB17_enepW11 = 2.240351 if districtW11 == 10863
replace GB17_enepW11 = 2.131276 if districtW11 == 10864
replace GB17_enepW11 = 1.789284 if districtW11 == 10865
replace GB17_enepW11 = 2.162014 if districtW11 == 10866
replace GB17_enepW11 = 2.058377 if districtW11 == 10867
replace GB17_enepW11 = 2.282032 if districtW11 == 10868
replace GB17_enepW11 = 2.143017 if districtW11 == 10869
replace GB17_enepW11 = 2.282635 if districtW11 == 10870
replace GB17_enepW11 = 1.986361 if districtW11 == 10871
replace GB17_enepW11 = 2.164598 if districtW11 == 10872
replace GB17_enepW11 = 2.073927 if districtW11 == 10873
replace GB17_enepW11 = 2.583319 if districtW11 == 10874
replace GB17_enepW11 = 2.201624 if districtW11 == 10875
replace GB17_enepW11 = 2.484068 if districtW11 == 10876
replace GB17_enepW11 = 2.267808 if districtW11 == 10877
replace GB17_enepW11 = 2.2143 if districtW11 == 10878
replace GB17_enepW11 = 2.281806 if districtW11 == 10879
replace GB17_enepW11 = 2.246128 if districtW11 == 10880
replace GB17_enepW11 = 2.318914 if districtW11 == 10881
replace GB17_enepW11 = 2.005575 if districtW11 == 10882
replace GB17_enepW11 = 2.390003 if districtW11 == 10883
replace GB17_enepW11 = 2.939477 if districtW11 == 10884
replace GB17_enepW11 = 1.915446 if districtW11 == 10885
replace GB17_enepW11 = 2.251307 if districtW11 == 10886
replace GB17_enepW11 = 2.667052 if districtW11 == 10887
replace GB17_enepW11 = 1.970934 if districtW11 == 10888
replace GB17_enepW11 = 2.362307 if districtW11 == 10889
replace GB17_enepW11 = 2.321747 if districtW11 == 10890
replace GB17_enepW11 = 2.35287 if districtW11 == 10891
replace GB17_enepW11 = 2.45245 if districtW11 == 10892
replace GB17_enepW11 = 2.469802 if districtW11 == 10893
replace GB17_enepW11 = 2.205554 if districtW11 == 10894
replace GB17_enepW11 = 2.129848 if districtW11 == 10895
replace GB17_enepW11 = 2.40812 if districtW11 == 10896
replace GB17_enepW11 = 2.35183 if districtW11 == 10897
replace GB17_enepW11 = 2.330394 if districtW11 == 10898
replace GB17_enepW11 = 2.630721 if districtW11 == 10899
replace GB17_enepW11 = 2.186886 if districtW11 == 10900
replace GB17_enepW11 = 2.444156 if districtW11 == 10901
replace GB17_enepW11 = 2.187856 if districtW11 == 10902
replace GB17_enepW11 = 2.496973 if districtW11 == 10903
replace GB17_enepW11 = 2.502902 if districtW11 == 10904
replace GB17_enepW11 = 2.247854 if districtW11 == 10905
replace GB17_enepW11 = 2.32461 if districtW11 == 10906
replace GB17_enepW11 = 2.245392 if districtW11 == 10907
replace GB17_enepW11 = 2.395629 if districtW11 == 10908
replace GB17_enepW11 = 2.198238 if districtW11 == 10909
replace GB17_enepW11 = 2.243962 if districtW11 == 10910
replace GB17_enepW11 = 2.01741 if districtW11 == 10911
replace GB17_enepW11 = 2.404034 if districtW11 == 10912
replace GB17_enepW11 = 2.444658 if districtW11 == 10913
replace GB17_enepW11 = 2.169204 if districtW11 == 10914
replace GB17_enepW11 = 2.282858 if districtW11 == 10915
replace GB17_enepW11 = 1.97052 if districtW11 == 10916
replace GB17_enepW11 = 2.155745 if districtW11 == 10917
replace GB17_enepW11 = 2.176269 if districtW11 == 10918
replace GB17_enepW11 = 1.887884 if districtW11 == 10919
replace GB17_enepW11 = 2.237126 if districtW11 == 10920
replace GB17_enepW11 = 1.979931 if districtW11 == 10921
replace GB17_enepW11 = 3.083174 if districtW11 == 10922
replace GB17_enepW11 = 2.238938 if districtW11 == 10923
replace GB17_enepW11 = 2.264125 if districtW11 == 10924
replace GB17_enepW11 = 2.236892 if districtW11 == 10925
replace GB17_enepW11 = 2.472413 if districtW11 == 10926
replace GB17_enepW11 = 2.184261 if districtW11 == 10927
replace GB17_enepW11 = 2.095016 if districtW11 == 10928
replace GB17_enepW11 = 2.0745 if districtW11 == 10929
replace GB17_enepW11 = 2.011071 if districtW11 == 10930
replace GB17_enepW11 = 2.431633 if districtW11 == 10931
replace GB17_enepW11 = 2.523471 if districtW11 == 10932
replace GB17_enepW11 = 2.301055 if districtW11 == 10933
replace GB17_enepW11 = 2.647134 if districtW11 == 10934
replace GB17_enepW11 = 2.101382 if districtW11 == 10935
replace GB17_enepW11 = 2.307671 if districtW11 == 10936
replace GB17_enepW11 = 2.518115 if districtW11 == 10937
replace GB17_enepW11 = 2.52059 if districtW11 == 10938
replace GB17_enepW11 = 1.873835 if districtW11 == 10939
replace GB17_enepW11 = 2.165631 if districtW11 == 10940
replace GB17_enepW11 = 2.261467 if districtW11 == 10941
replace GB17_enepW11 = 2.133088 if districtW11 == 10942
replace GB17_enepW11 = 2.29312 if districtW11 == 10943
replace GB17_enepW11 = 2.210005 if districtW11 == 10944
replace GB17_enepW11 = 1.812005 if districtW11 == 10945
replace GB17_enepW11 = 2.228081 if districtW11 == 10946
replace GB17_enepW11 = 2.344279 if districtW11 == 10947
replace GB17_enepW11 = 2.459598 if districtW11 == 10948
replace GB17_enepW11 = 2.138323 if districtW11 == 10949
replace GB17_enepW11 = 2.21377 if districtW11 == 10950
replace GB17_enepW11 = 2.403015 if districtW11 == 10951
replace GB17_enepW11 = 2.102297 if districtW11 == 10952
replace GB17_enepW11 = 2.655219 if districtW11 == 10953
replace GB17_enepW11 = 2.270306 if districtW11 == 10954
replace GB17_enepW11 = 2.302431 if districtW11 == 10955
replace GB17_enepW11 = 2.161747 if districtW11 == 10956
replace GB17_enepW11 = 2.359314 if districtW11 == 10957
replace GB17_enepW11 = 3.068241 if districtW11 == 10958
replace GB17_enepW11 = 2.346343 if districtW11 == 10959
replace GB17_enepW11 = 2.906279 if districtW11 == 10960
replace GB17_enepW11 = 2.662782 if districtW11 == 10961
replace GB17_enepW11 = 2.071776 if districtW11 == 10962
replace GB17_enepW11 = 1.955049 if districtW11 == 10963
replace GB17_enepW11 = 2.57734 if districtW11 == 10964
replace GB17_enepW11 = 2.173963 if districtW11 == 10965
replace GB17_enepW11 = 2.196275 if districtW11 == 10966
replace GB17_enepW11 = 2.111857 if districtW11 == 10967
replace GB17_enepW11 = 2.255591 if districtW11 == 10968
replace GB17_enepW11 = 2.067456 if districtW11 == 10969
replace GB17_enepW11 = 2.179937 if districtW11 == 10970
replace GB17_enepW11 = 2.195531 if districtW11 == 10971
replace GB17_enepW11 = 2.342739 if districtW11 == 10972
replace GB17_enepW11 = 2.151636 if districtW11 == 10973
replace GB17_enepW11 = 2.143434 if districtW11 == 10974
replace GB17_enepW11 = 2.075442 if districtW11 == 10975
replace GB17_enepW11 = 2.241133 if districtW11 == 10976
replace GB17_enepW11 = 2.184214 if districtW11 == 10977
replace GB17_enepW11 = 1.923499 if districtW11 == 10978
replace GB17_enepW11 = 1.912821 if districtW11 == 10979
replace GB17_enepW11 = 2.306232 if districtW11 == 10980
replace GB17_enepW11 = 2.293996 if districtW11 == 10981
replace GB17_enepW11 = 2.357498 if districtW11 == 10982
replace GB17_enepW11 = 2.129001 if districtW11 == 10983
replace GB17_enepW11 = 2.667239 if districtW11 == 10984
replace GB17_enepW11 = 2.100803 if districtW11 == 10985
replace GB17_enepW11 = 2.018903 if districtW11 == 10986
replace GB17_enepW11 = 2.31015 if districtW11 == 10987
replace GB17_enepW11 = 2.628185 if districtW11 == 10988
replace GB17_enepW11 = 2.172008 if districtW11 == 10989
replace GB17_enepW11 = 2.343004 if districtW11 == 10990
replace GB17_enepW11 = 2.337932 if districtW11 == 10991
replace GB17_enepW11 = 2.273291 if districtW11 == 10992
replace GB17_enepW11 = 2.302235 if districtW11 == 10993
replace GB17_enepW11 = 2.38756 if districtW11 == 10994
replace GB17_enepW11 = 2.878877 if districtW11 == 10995
replace GB17_enepW11 = 2.185543 if districtW11 == 10996
replace GB17_enepW11 = 2.163944 if districtW11 == 10997
replace GB17_enepW11 = 2.136452 if districtW11 == 10998
replace GB17_enepW11 = 2.643803 if districtW11 == 10999
replace GB17_enepW11 = 2.507517 if districtW11 == 11000
replace GB17_enepW11 = 2.63966 if districtW11 == 11001
replace GB17_enepW11 = 1.469334 if districtW11 == 11002
replace GB17_enepW11 = 2.767881 if districtW11 == 11003
replace GB17_enepW11 = 2.464078 if districtW11 == 11004
replace GB17_enepW11 = 2.318186 if districtW11 == 11005
replace GB17_enepW11 = 2.178325 if districtW11 == 11006
replace GB17_enepW11 = 2.374825 if districtW11 == 11007
replace GB17_enepW11 = 2.457939 if districtW11 == 11008
replace GB17_enepW11 = 2.222423 if districtW11 == 11009
replace GB17_enepW11 = 1.76808 if districtW11 == 11010
replace GB17_enepW11 = 2.306994 if districtW11 == 11011
replace GB17_enepW11 = 2.130349 if districtW11 == 11012
replace GB17_enepW11 = 1.491336 if districtW11 == 11013
replace GB17_enepW11 = 2.274529 if districtW11 == 11014
replace GB17_enepW11 = 2.579165 if districtW11 == 11015
replace GB17_enepW11 = 1.918404 if districtW11 == 11016
replace GB17_enepW11 = 2.202906 if districtW11 == 11017
replace GB17_enepW11 = 2.307646 if districtW11 == 11018
replace GB17_enepW11 = 2.388419 if districtW11 == 11019
replace GB17_enepW11 = 2.186958 if districtW11 == 11020
replace GB17_enepW11 = 2.540758 if districtW11 == 11021
replace GB17_enepW11 = 2.303468 if districtW11 == 11022
replace GB17_enepW11 = 2.28915 if districtW11 == 11023
replace GB17_enepW11 = 2.184278 if districtW11 == 11024
replace GB17_enepW11 = 2.230628 if districtW11 == 11025
replace GB17_enepW11 = 2.459506 if districtW11 == 11026
replace GB17_enepW11 = 2.485051 if districtW11 == 11027
replace GB17_enepW11 = 1.918731 if districtW11 == 11028
replace GB17_enepW11 = 2.071431 if districtW11 == 11029
replace GB17_enepW11 = 2.310116 if districtW11 == 11030
replace GB17_enepW11 = 2.516495 if districtW11 == 11031
replace GB17_enepW11 = 1.621276 if districtW11 == 11032
replace GB17_enepW11 = 2.052349 if districtW11 == 11033
replace GB17_enepW11 = 2.184448 if districtW11 == 11034
replace GB17_enepW11 = 2.251905 if districtW11 == 11035
replace GB17_enepW11 = 2.115628 if districtW11 == 11036
replace GB17_enepW11 = 2.409356 if districtW11 == 11037
replace GB17_enepW11 = 2.505666 if districtW11 == 11038
replace GB17_enepW11 = 2.117923 if districtW11 == 11039
replace GB17_enepW11 = 2.746009 if districtW11 == 11040
replace GB17_enepW11 = 2.493002 if districtW11 == 11041
replace GB17_enepW11 = 2.093132 if districtW11 == 11042
replace GB17_enepW11 = 2.085988 if districtW11 == 11043
replace GB17_enepW11 = 2.114856 if districtW11 == 11044
replace GB17_enepW11 = 2.049009 if districtW11 == 11045
replace GB17_enepW11 = 2.540735 if districtW11 == 11046
replace GB17_enepW11 = 2.620387 if districtW11 == 11047
replace GB17_enepW11 = 2.439631 if districtW11 == 11048
replace GB17_enepW11 = 2.257192 if districtW11 == 11049
replace GB17_enepW11 = 2.163118 if districtW11 == 11050
replace GB17_enepW11 = 2.272487 if districtW11 == 11051
replace GB17_enepW11 = 2.378237 if districtW11 == 11052
replace GB17_enepW11 = 2.283342 if districtW11 == 11053
replace GB17_enepW11 = 2.09913 if districtW11 == 11054
replace GB17_enepW11 = 2.372007 if districtW11 == 11055
replace GB17_enepW11 = 2.50124 if districtW11 == 11056
replace GB17_enepW11 = 2.150325 if districtW11 == 11057
replace GB17_enepW11 = 2.229347 if districtW11 == 11058
replace GB17_enepW11 = 2.09573 if districtW11 == 11059
replace GB17_enepW11 = 2.491919 if districtW11 == 11060
replace GB17_enepW11 = 1.931056 if districtW11 == 11061
replace GB17_enepW11 = 2.457938 if districtW11 == 11062
replace GB17_enepW11 = 2.26035 if districtW11 == 40001
replace GB17_enepW11 = 2.545037 if districtW11 == 40002
replace GB17_enepW11 = 4.481795 if districtW11 == 40003
replace GB17_enepW11 = 2.088722 if districtW11 == 40004
replace GB17_enepW11 = 2.647678 if districtW11 == 40005
replace GB17_enepW11 = 3.098388 if districtW11 == 40006
replace GB17_enepW11 = 2.311519 if districtW11 == 40007
replace GB17_enepW11 = 2.943556 if districtW11 == 40008
replace GB17_enepW11 = 2.485401 if districtW11 == 40009
replace GB17_enepW11 = 2.60507 if districtW11 == 40010
replace GB17_enepW11 = 3.068544 if districtW11 == 40011
replace GB17_enepW11 = 2.573709 if districtW11 == 40012
replace GB17_enepW11 = 3.040342 if districtW11 == 40013
replace GB17_enepW11 = 3.542819 if districtW11 == 40014
replace GB17_enepW11 = 3.162837 if districtW11 == 40015
replace GB17_enepW11 = 2.356214 if districtW11 == 40016
replace GB17_enepW11 = 3.324221 if districtW11 == 40017
replace GB17_enepW11 = 2.856021 if districtW11 == 40018
replace GB17_enepW11 = 3.182578 if districtW11 == 20001
replace GB17_enepW11 = 3.104562 if districtW11 == 20002
replace GB17_enepW11 = 3.000885 if districtW11 == 20003
replace GB17_enepW11 = 2.697778 if districtW11 == 20004
replace GB17_enepW11 = 3.460756 if districtW11 == 20005
replace GB17_enepW11 = 2.986931 if districtW11 == 20006
replace GB17_enepW11 = 2.543601 if districtW11 == 20007
replace GB17_enepW11 = 2.455543 if districtW11 == 20008
replace GB17_enepW11 = 3.573568 if districtW11 == 20009
replace GB17_enepW11 = 3.074989 if districtW11 == 20010
replace GB17_enepW11 = 2.76836 if districtW11 == 20011
replace GB17_enepW11 = 2.944706 if districtW11 == 20012
replace GB17_enepW11 = 2.971134 if districtW11 == 20013
replace GB17_enepW11 = 2.75218 if districtW11 == 20014
replace GB17_enepW11 = 3.052488 if districtW11 == 20015
replace GB17_enepW11 = 2.823787 if districtW11 == 20016
replace GB17_enepW11 = 3.27478 if districtW11 == 20017
replace GB17_enepW11 = 3.34636 if districtW11 == 20018
replace GB17_enepW11 = 3.157351 if districtW11 == 20019
replace GB17_enepW11 = 3.203635 if districtW11 == 20020
replace GB17_enepW11 = 3.037123 if districtW11 == 20021
replace GB17_enepW11 = 2.965182 if districtW11 == 20022
replace GB17_enepW11 = 3.449907 if districtW11 == 20023
replace GB17_enepW11 = 2.552764 if districtW11 == 20024
replace GB17_enepW11 = 3.211814 if districtW11 == 20025
replace GB17_enepW11 = 3.705678 if districtW11 == 20026
replace GB17_enepW11 = 3.207093 if districtW11 == 20027
replace GB17_enepW11 = 3.227978 if districtW11 == 20028
replace GB17_enepW11 = 2.717103 if districtW11 == 20029
replace GB17_enepW11 = 2.984024 if districtW11 == 20030
replace GB17_enepW11 = 3.41557 if districtW11 == 20031
replace GB17_enepW11 = 2.638514 if districtW11 == 20032
replace GB17_enepW11 = 2.912936 if districtW11 == 20033
replace GB17_enepW11 = 2.940403 if districtW11 == 20034
replace GB17_enepW11 = 2.822905 if districtW11 == 20035
replace GB17_enepW11 = 2.9189 if districtW11 == 20036
replace GB17_enepW11 = 3.106933 if districtW11 == 20037
replace GB17_enepW11 = 2.978525 if districtW11 == 20038
replace GB17_enepW11 = 3.40817 if districtW11 == 20039
replace GB17_enepW11 = 2.993202 if districtW11 == 20040
replace GB17_enepW11 = 3.102781 if districtW11 == 20041
replace GB17_enepW11 = 3.213736 if districtW11 == 20042
replace GB17_enepW11 = 3.176412 if districtW11 == 20043
replace GB17_enepW11 = 3.052871 if districtW11 == 20044
replace GB17_enepW11 = 3.157772 if districtW11 == 20045
replace GB17_enepW11 = 2.568854 if districtW11 == 20046
replace GB17_enepW11 = 3.00638 if districtW11 == 20047
replace GB17_enepW11 = 3.076488 if districtW11 == 20048
replace GB17_enepW11 = 3.528421 if districtW11 == 20049
replace GB17_enepW11 = 2.961596 if districtW11 == 20050
replace GB17_enepW11 = 2.931223 if districtW11 == 20051
replace GB17_enepW11 = 3.139852 if districtW11 == 20052
replace GB17_enepW11 = 3.083298 if districtW11 == 20053
replace GB17_enepW11 = 2.69463 if districtW11 == 20054
replace GB17_enepW11 = 3.537244 if districtW11 == 20055
replace GB17_enepW11 = 3.142722 if districtW11 == 20056
replace GB17_enepW11 = 3.101114 if districtW11 == 20057
replace GB17_enepW11 = 2.824909 if districtW11 == 20058
replace GB17_enepW11 = 2.812466 if districtW11 == 20059
replace GB17_enepW11 = 3.049034 if districtW11 == 30041
replace GB17_enepW11 = 2.241227 if districtW11 == 30042
replace GB17_enepW11 = 2.291618 if districtW11 == 30043
replace GB17_enepW11 = 2.311365 if districtW11 == 30044
replace GB17_enepW11 = 2.657645 if districtW11 == 30045
replace GB17_enepW11 = 2.309978 if districtW11 == 30046
replace GB17_enepW11 = 2.182444 if districtW11 == 30047
replace GB17_enepW11 = 2.111002 if districtW11 == 30048
replace GB17_enepW11 = 1.982805 if districtW11 == 30049
replace GB17_enepW11 = 2.234469 if districtW11 == 30050
replace GB17_enepW11 = 2.320142 if districtW11 == 30051
replace GB17_enepW11 = 2.122759 if districtW11 == 30052
replace GB17_enepW11 = 2.312661 if districtW11 == 30053
replace GB17_enepW11 = 2.386359 if districtW11 == 30054
replace GB17_enepW11 = 2.26024 if districtW11 == 30055
replace GB17_enepW11 = 2.326244 if districtW11 == 30056
replace GB17_enepW11 = 2.792168 if districtW11 == 30057
replace GB17_enepW11 = 2.557024 if districtW11 == 30058
replace GB17_enepW11 = 2.512804 if districtW11 == 30059
replace GB17_enepW11 = 2.231512 if districtW11 == 30060
replace GB17_enepW11 = 3.009493 if districtW11 == 30061
replace GB17_enepW11 = 2.412818 if districtW11 == 30062
replace GB17_enepW11 = 2.774345 if districtW11 == 30063
replace GB17_enepW11 = 4.095582 if districtW11 == 30064
replace GB17_enepW11 = 2.660415 if districtW11 == 30065
replace GB17_enepW11 = 2.600379 if districtW11 == 30066
replace GB17_enepW11 = 3.19205 if districtW11 == 30067
replace GB17_enepW11 = 2.828165 if districtW11 == 30068
replace GB17_enepW11 = 2.505577 if districtW11 == 30069
replace GB17_enepW11 = 2.321557 if districtW11 == 30070
replace GB17_enepW11 = 2.048278 if districtW11 == 30071
replace GB17_enepW11 = 2.469675 if districtW11 == 30072
replace GB17_enepW11 = 2.394053 if districtW11 == 30073
replace GB17_enepW11 = 2.174288 if districtW11 == 30074
replace GB17_enepW11 = 2.550946 if districtW11 == 30075
replace GB17_enepW11 = 2.615181 if districtW11 == 30076
replace GB17_enepW11 = 2.333968 if districtW11 == 30077
replace GB17_enepW11 = 2.402709 if districtW11 == 30078
replace GB17_enepW11 = 2.383412 if districtW11 == 30079
replace GB17_enepW11 = 2.231568 if districtW11 == 30080

gen GB17_enepW12 = .

replace GB17_enepW12 = 2.436347 if districtW12 == 10530
replace GB17_enepW12 = 1.929627 if districtW12 == 10531
replace GB17_enepW12 = 2.395331 if districtW12 == 10532
replace GB17_enepW12 = 2.13507 if districtW12 == 10533
replace GB17_enepW12 = 2.225745 if districtW12 == 10534
replace GB17_enepW12 = 2.736126 if districtW12 == 10535
replace GB17_enepW12 = 2.266248 if districtW12 == 10536
replace GB17_enepW12 = 2.131891 if districtW12 == 10537
replace GB17_enepW12 = 2.483196 if districtW12 == 10538
replace GB17_enepW12 = 2.410754 if districtW12 == 10539
replace GB17_enepW12 = 1.943977 if districtW12 == 10540
replace GB17_enepW12 = 2.107423 if districtW12 == 10541
replace GB17_enepW12 = 2.299328 if districtW12 == 10542
replace GB17_enepW12 = 2.233326 if districtW12 == 10543
replace GB17_enepW12 = 2.120211 if districtW12 == 10544
replace GB17_enepW12 = 2.430745 if districtW12 == 10545
replace GB17_enepW12 = 2.152648 if districtW12 == 10546
replace GB17_enepW12 = 2.67727 if districtW12 == 10547
replace GB17_enepW12 = 2.174806 if districtW12 == 10548
replace GB17_enepW12 = 2.558633 if districtW12 == 10549
replace GB17_enepW12 = 2.085435 if districtW12 == 10550
replace GB17_enepW12 = 2.224235 if districtW12 == 10551
replace GB17_enepW12 = 2.337414 if districtW12 == 10552
replace GB17_enepW12 = 2.517348 if districtW12 == 10553
replace GB17_enepW12 = 2.628381 if districtW12 == 10554
replace GB17_enepW12 = 1.853616 if districtW12 == 10555
replace GB17_enepW12 = 2.200783 if districtW12 == 10556
replace GB17_enepW12 = 2.21031 if districtW12 == 10557
replace GB17_enepW12 = 2.285161 if districtW12 == 10558
replace GB17_enepW12 = 1.598057 if districtW12 == 10559
replace GB17_enepW12 = 2.159324 if districtW12 == 10560
replace GB17_enepW12 = 2.066296 if districtW12 == 10561
replace GB17_enepW12 = 1.591108 if districtW12 == 10562
replace GB17_enepW12 = 1.474918 if districtW12 == 10563
replace GB17_enepW12 = 1.423479 if districtW12 == 10564
replace GB17_enepW12 = 2.145358 if districtW12 == 10565
replace GB17_enepW12 = 1.867602 if districtW12 == 10566
replace GB17_enepW12 = 2.001953 if districtW12 == 10567
replace GB17_enepW12 = 2.505523 if districtW12 == 10568
replace GB17_enepW12 = 2.209871 if districtW12 == 10569
replace GB17_enepW12 = 1.786995 if districtW12 == 10570
replace GB17_enepW12 = 1.83352 if districtW12 == 10571
replace GB17_enepW12 = 2.256202 if districtW12 == 10572
replace GB17_enepW12 = 2.270224 if districtW12 == 10573
replace GB17_enepW12 = 2.471116 if districtW12 == 10574
replace GB17_enepW12 = 2.198952 if districtW12 == 10575
replace GB17_enepW12 = 2.397166 if districtW12 == 10576
replace GB17_enepW12 = 2.288342 if districtW12 == 10577
replace GB17_enepW12 = 2.290913 if districtW12 == 10578
replace GB17_enepW12 = 2.170194 if districtW12 == 10579
replace GB17_enepW12 = 2.254186 if districtW12 == 10580
replace GB17_enepW12 = 1.386512 if districtW12 == 10581
replace GB17_enepW12 = 2.113118 if districtW12 == 10582
replace GB17_enepW12 = 2.438136 if districtW12 == 10583
replace GB17_enepW12 = 2.49214 if districtW12 == 10584
replace GB17_enepW12 = 2.367873 if districtW12 == 10585
replace GB17_enepW12 = 2.254371 if districtW12 == 10586
replace GB17_enepW12 = 2.098465 if districtW12 == 10587
replace GB17_enepW12 = 2.249257 if districtW12 == 10588
replace GB17_enepW12 = 2.146602 if districtW12 == 10589
replace GB17_enepW12 = 2.108207 if districtW12 == 10590
replace GB17_enepW12 = 1.74039 if districtW12 == 10591
replace GB17_enepW12 = 1.987585 if districtW12 == 10592
replace GB17_enepW12 = 2.112983 if districtW12 == 10593
replace GB17_enepW12 = 2.069875 if districtW12 == 10594
replace GB17_enepW12 = 2.506666 if districtW12 == 10595
replace GB17_enepW12 = 2.103496 if districtW12 == 10596
replace GB17_enepW12 = 2.050606 if districtW12 == 10597
replace GB17_enepW12 = 2.618217 if districtW12 == 10598
replace GB17_enepW12 = 2.049175 if districtW12 == 10599
replace GB17_enepW12 = 2.299259 if districtW12 == 10600
replace GB17_enepW12 = 2.185131 if districtW12 == 10601
replace GB17_enepW12 = 2.10271 if districtW12 == 10602
replace GB17_enepW12 = 2.323001 if districtW12 == 10603
replace GB17_enepW12 = 2.442998 if districtW12 == 10604
replace GB17_enepW12 = 2.063022 if districtW12 == 10605
replace GB17_enepW12 = 2.115127 if districtW12 == 10606
replace GB17_enepW12 = 2.345166 if districtW12 == 10607
replace GB17_enepW12 = 2.136163 if districtW12 == 10608
replace GB17_enepW12 = 2.934103 if districtW12 == 10609
replace GB17_enepW12 = 2.082243 if districtW12 == 10610
replace GB17_enepW12 = 2.058986 if districtW12 == 10611
replace GB17_enepW12 = 2.184301 if districtW12 == 10612
replace GB17_enepW12 = 2.258507 if districtW12 == 10613
replace GB17_enepW12 = 2.389285 if districtW12 == 10614
replace GB17_enepW12 = 1.597481 if districtW12 == 10615
replace GB17_enepW12 = 2.352654 if districtW12 == 10616
replace GB17_enepW12 = 2.616123 if districtW12 == 10617
replace GB17_enepW12 = 2.248156 if districtW12 == 10618
replace GB17_enepW12 = 2.442693 if districtW12 == 10619
replace GB17_enepW12 = 2.25819 if districtW12 == 10620
replace GB17_enepW12 = 2.862654 if districtW12 == 10621
replace GB17_enepW12 = 1.927912 if districtW12 == 10622
replace GB17_enepW12 = 2.62936 if districtW12 == 10623
replace GB17_enepW12 = 2.204537 if districtW12 == 10624
replace GB17_enepW12 = 2.165502 if districtW12 == 10625
replace GB17_enepW12 = 2.263731 if districtW12 == 10626
replace GB17_enepW12 = 2.723454 if districtW12 == 10627
replace GB17_enepW12 = 2.544933 if districtW12 == 10628
replace GB17_enepW12 = 2.499705 if districtW12 == 10629
replace GB17_enepW12 = 2.468564 if districtW12 == 10630
replace GB17_enepW12 = 2.331837 if districtW12 == 10631
replace GB17_enepW12 = 2.349838 if districtW12 == 10632
replace GB17_enepW12 = 2.345891 if districtW12 == 10633
replace GB17_enepW12 = 2.287569 if districtW12 == 10634
replace GB17_enepW12 = 2.477007 if districtW12 == 10635
replace GB17_enepW12 = 2.34148 if districtW12 == 10636
replace GB17_enepW12 = 2.082061 if districtW12 == 10637
replace GB17_enepW12 = 1.884799 if districtW12 == 10638
replace GB17_enepW12 = 2.649009 if districtW12 == 10639
replace GB17_enepW12 = 2.053942 if districtW12 == 10640
replace GB17_enepW12 = 2.459959 if districtW12 == 10641
replace GB17_enepW12 = 2.242338 if districtW12 == 10642
replace GB17_enepW12 = 2.204614 if districtW12 == 10643
replace GB17_enepW12 = 2.747585 if districtW12 == 10644
replace GB17_enepW12 = 2.258785 if districtW12 == 10645
replace GB17_enepW12 = 2.269391 if districtW12 == 10646
replace GB17_enepW12 = 2.242152 if districtW12 == 10647
replace GB17_enepW12 = 2.252852 if districtW12 == 10648
replace GB17_enepW12 = 2.02651 if districtW12 == 10649
replace GB17_enepW12 = 2.334428 if districtW12 == 10650
replace GB17_enepW12 = 2.222883 if districtW12 == 10651
replace GB17_enepW12 = 2.146238 if districtW12 == 10652
replace GB17_enepW12 = 2.247322 if districtW12 == 10653
replace GB17_enepW12 = 2.199705 if districtW12 == 10654
replace GB17_enepW12 = 1.693239 if districtW12 == 10655
replace GB17_enepW12 = 2.334919 if districtW12 == 10656
replace GB17_enepW12 = 2.406503 if districtW12 == 10657
replace GB17_enepW12 = 2.247831 if districtW12 == 10658
replace GB17_enepW12 = 2.247658 if districtW12 == 10659
replace GB17_enepW12 = 2.114228 if districtW12 == 10660
replace GB17_enepW12 = 2.06279 if districtW12 == 10661
replace GB17_enepW12 = 2.296903 if districtW12 == 10662
replace GB17_enepW12 = 2.195803 if districtW12 == 10663
replace GB17_enepW12 = 2.168361 if districtW12 == 10664
replace GB17_enepW12 = 2.229861 if districtW12 == 10665
replace GB17_enepW12 = 2.156484 if districtW12 == 10666
replace GB17_enepW12 = 2.193398 if districtW12 == 10667
replace GB17_enepW12 = 2.19556 if districtW12 == 10668
replace GB17_enepW12 = 2.219979 if districtW12 == 10669
replace GB17_enepW12 = 2.293195 if districtW12 == 10670
replace GB17_enepW12 = 2.29918 if districtW12 == 10671
replace GB17_enepW12 = 2.209938 if districtW12 == 10672
replace GB17_enepW12 = 1.887205 if districtW12 == 10673
replace GB17_enepW12 = 2.082514 if districtW12 == 10674
replace GB17_enepW12 = 1.934205 if districtW12 == 10675
replace GB17_enepW12 = 1.846187 if districtW12 == 10676
replace GB17_enepW12 = 2.156631 if districtW12 == 10677
replace GB17_enepW12 = 2.677104 if districtW12 == 10678
replace GB17_enepW12 = 1.410199 if districtW12 == 10679
replace GB17_enepW12 = 2.183408 if districtW12 == 10680
replace GB17_enepW12 = 2.450915 if districtW12 == 10681
replace GB17_enepW12 = 2.51458 if districtW12 == 10682
replace GB17_enepW12 = 2.293841 if districtW12 == 10683
replace GB17_enepW12 = 2.375693 if districtW12 == 10684
replace GB17_enepW12 = 2.769017 if districtW12 == 10685
replace GB17_enepW12 = 2.271405 if districtW12 == 10686
replace GB17_enepW12 = 1.768484 if districtW12 == 10687
replace GB17_enepW12 = 2.057268 if districtW12 == 10688
replace GB17_enepW12 = 2.266949 if districtW12 == 10689
replace GB17_enepW12 = 2.15457 if districtW12 == 10690
replace GB17_enepW12 = 2.110473 if districtW12 == 10691
replace GB17_enepW12 = 2.21483 if districtW12 == 10692
replace GB17_enepW12 = 2.188978 if districtW12 == 10693
replace GB17_enepW12 = 2.303423 if districtW12 == 10694
replace GB17_enepW12 = 2.186712 if districtW12 == 10695
replace GB17_enepW12 = 2.194478 if districtW12 == 10696
replace GB17_enepW12 = 2.421993 if districtW12 == 10697
replace GB17_enepW12 = 2.028284 if districtW12 == 10698
replace GB17_enepW12 = 2.145119 if districtW12 == 10699
replace GB17_enepW12 = 2.23482 if districtW12 == 10700
replace GB17_enepW12 = 2.093927 if districtW12 == 10701
replace GB17_enepW12 = 2.336972 if districtW12 == 10702
replace GB17_enepW12 = 2.397725 if districtW12 == 10703
replace GB17_enepW12 = 2.568903 if districtW12 == 10704
replace GB17_enepW12 = 2.345302 if districtW12 == 10705
replace GB17_enepW12 = 2.169219 if districtW12 == 10706
replace GB17_enepW12 = 2.126892 if districtW12 == 10707
replace GB17_enepW12 = 1.571101 if districtW12 == 10708
replace GB17_enepW12 = 2.055956 if districtW12 == 10709
replace GB17_enepW12 = 2.202323 if districtW12 == 10710
replace GB17_enepW12 = 2.269177 if districtW12 == 10711
replace GB17_enepW12 = 2.394747 if districtW12 == 10712
replace GB17_enepW12 = 2.167653 if districtW12 == 10713
replace GB17_enepW12 = 2.178281 if districtW12 == 10714
replace GB17_enepW12 = 2.250031 if districtW12 == 10715
replace GB17_enepW12 = 2.353957 if districtW12 == 10716
replace GB17_enepW12 = 2.337036 if districtW12 == 10717
replace GB17_enepW12 = 2.058807 if districtW12 == 10718
replace GB17_enepW12 = 2.554824 if districtW12 == 10719
replace GB17_enepW12 = 1.705329 if districtW12 == 10720
replace GB17_enepW12 = 1.545417 if districtW12 == 10721
replace GB17_enepW12 = 2.315912 if districtW12 == 10722
replace GB17_enepW12 = 2.199758 if districtW12 == 10723
replace GB17_enepW12 = 2.125204 if districtW12 == 10724
replace GB17_enepW12 = 1.724221 if districtW12 == 10725
replace GB17_enepW12 = 2.038373 if districtW12 == 10726
replace GB17_enepW12 = 2.183266 if districtW12 == 10727
replace GB17_enepW12 = 2.596301 if districtW12 == 10728
replace GB17_enepW12 = 2.266181 if districtW12 == 10729
replace GB17_enepW12 = 2.480128 if districtW12 == 10730
replace GB17_enepW12 = 2.189401 if districtW12 == 10731
replace GB17_enepW12 = 2.042799 if districtW12 == 10732
replace GB17_enepW12 = 2.460599 if districtW12 == 10733
replace GB17_enepW12 = 2.275751 if districtW12 == 10734
replace GB17_enepW12 = 2.296636 if districtW12 == 10735
replace GB17_enepW12 = 2.338022 if districtW12 == 10736
replace GB17_enepW12 = 1.90392 if districtW12 == 10737
replace GB17_enepW12 = 2.802327 if districtW12 == 10738
replace GB17_enepW12 = 2.260312 if districtW12 == 10739
replace GB17_enepW12 = 2.310271 if districtW12 == 10740
replace GB17_enepW12 = 2.253618 if districtW12 == 10741
replace GB17_enepW12 = 2.420112 if districtW12 == 10742
replace GB17_enepW12 = 2.772133 if districtW12 == 10743
replace GB17_enepW12 = 2.207818 if districtW12 == 10744
replace GB17_enepW12 = 2.175702 if districtW12 == 10745
replace GB17_enepW12 = 2.41048 if districtW12 == 10746
replace GB17_enepW12 = 2.307497 if districtW12 == 10747
replace GB17_enepW12 = 2.197546 if districtW12 == 10748
replace GB17_enepW12 = 2.502328 if districtW12 == 10749
replace GB17_enepW12 = 1.884244 if districtW12 == 10750
replace GB17_enepW12 = 2.225587 if districtW12 == 10751
replace GB17_enepW12 = 2.100967 if districtW12 == 10752
replace GB17_enepW12 = 2.391636 if districtW12 == 10753
replace GB17_enepW12 = 2.241863 if districtW12 == 10754
replace GB17_enepW12 = 1.953533 if districtW12 == 10755
replace GB17_enepW12 = 2.103918 if districtW12 == 10756
replace GB17_enepW12 = 2.450699 if districtW12 == 10757
replace GB17_enepW12 = 2.217661 if districtW12 == 10758
replace GB17_enepW12 = 2.037187 if districtW12 == 10759
replace GB17_enepW12 = 1.614721 if districtW12 == 10760
replace GB17_enepW12 = 2.297791 if districtW12 == 10761
replace GB17_enepW12 = 2.870981 if districtW12 == 10762
replace GB17_enepW12 = 1.791877 if districtW12 == 10763
replace GB17_enepW12 = 2.207464 if districtW12 == 10764
replace GB17_enepW12 = 2.038057 if districtW12 == 10765
replace GB17_enepW12 = 2.325471 if districtW12 == 10766
replace GB17_enepW12 = 2.246038 if districtW12 == 10767
replace GB17_enepW12 = 2.69072 if districtW12 == 10768
replace GB17_enepW12 = 2.124824 if districtW12 == 10769
replace GB17_enepW12 = 2.722802 if districtW12 == 10770
replace GB17_enepW12 = 2.296246 if districtW12 == 10771
replace GB17_enepW12 = 2.10367 if districtW12 == 10772
replace GB17_enepW12 = 2.634905 if districtW12 == 10773
replace GB17_enepW12 = 2.178488 if districtW12 == 10774
replace GB17_enepW12 = 1.355007 if districtW12 == 10775
replace GB17_enepW12 = 2.12947 if districtW12 == 10776
replace GB17_enepW12 = 1.861266 if districtW12 == 10777
replace GB17_enepW12 = 2.117027 if districtW12 == 10778
replace GB17_enepW12 = 2.016744 if districtW12 == 10779
replace GB17_enepW12 = 2.811337 if districtW12 == 10780
replace GB17_enepW12 = 2.080691 if districtW12 == 10781
replace GB17_enepW12 = 1.962568 if districtW12 == 10782
replace GB17_enepW12 = 1.698586 if districtW12 == 10783
replace GB17_enepW12 = 2.124819 if districtW12 == 10784
replace GB17_enepW12 = 2.231042 if districtW12 == 10785
replace GB17_enepW12 = 2.426609 if districtW12 == 10786
replace GB17_enepW12 = 1.933397 if districtW12 == 10787
replace GB17_enepW12 = 1.997207 if districtW12 == 10788
replace GB17_enepW12 = 1.623025 if districtW12 == 10789
replace GB17_enepW12 = 1.866358 if districtW12 == 10790
replace GB17_enepW12 = 2.039643 if districtW12 == 10791
replace GB17_enepW12 = 2.319609 if districtW12 == 10792
replace GB17_enepW12 = 1.37763 if districtW12 == 10793
replace GB17_enepW12 = 1.34488 if districtW12 == 10794
replace GB17_enepW12 = 1.534095 if districtW12 == 10795
replace GB17_enepW12 = 1.434758 if districtW12 == 10796
replace GB17_enepW12 = 2.336765 if districtW12 == 10797
replace GB17_enepW12 = 2.067765 if districtW12 == 10798
replace GB17_enepW12 = 2.143041 if districtW12 == 10799
replace GB17_enepW12 = 1.933441 if districtW12 == 10800
replace GB17_enepW12 = 2.021094 if districtW12 == 10801
replace GB17_enepW12 = 2.395431 if districtW12 == 10802
replace GB17_enepW12 = 2.127846 if districtW12 == 10803
replace GB17_enepW12 = 2.533548 if districtW12 == 10804
replace GB17_enepW12 = 2.15361 if districtW12 == 10805
replace GB17_enepW12 = 1.957887 if districtW12 == 10806
replace GB17_enepW12 = 1.608548 if districtW12 == 10807
replace GB17_enepW12 = 1.678817 if districtW12 == 10808
replace GB17_enepW12 = 1.817461 if districtW12 == 10809
replace GB17_enepW12 = 2.38518 if districtW12 == 10810
replace GB17_enepW12 = 2.088334 if districtW12 == 10811
replace GB17_enepW12 = 2.170118 if districtW12 == 10812
replace GB17_enepW12 = 2.147461 if districtW12 == 10813
replace GB17_enepW12 = 2.121616 if districtW12 == 10814
replace GB17_enepW12 = 2.25229 if districtW12 == 10815
replace GB17_enepW12 = 2.259021 if districtW12 == 10816
replace GB17_enepW12 = 2.475993 if districtW12 == 10817
replace GB17_enepW12 = 2.064548 if districtW12 == 10818
replace GB17_enepW12 = 1.980368 if districtW12 == 10819
replace GB17_enepW12 = 2.114126 if districtW12 == 10820
replace GB17_enepW12 = 2.351556 if districtW12 == 10821
replace GB17_enepW12 = 2.32991 if districtW12 == 10822
replace GB17_enepW12 = 1.880203 if districtW12 == 10823
replace GB17_enepW12 = 2.270447 if districtW12 == 10824
replace GB17_enepW12 = 2.33158 if districtW12 == 10825
replace GB17_enepW12 = 2.101607 if districtW12 == 10826
replace GB17_enepW12 = 2.198815 if districtW12 == 10827
replace GB17_enepW12 = 2.01822 if districtW12 == 10828
replace GB17_enepW12 = 2.065648 if districtW12 == 10829
replace GB17_enepW12 = 2.251496 if districtW12 == 10830
replace GB17_enepW12 = 2.057743 if districtW12 == 10831
replace GB17_enepW12 = 1.973052 if districtW12 == 10832
replace GB17_enepW12 = 2.34884 if districtW12 == 10833
replace GB17_enepW12 = 2.150462 if districtW12 == 10834
replace GB17_enepW12 = 2.503931 if districtW12 == 10835
replace GB17_enepW12 = 2.227216 if districtW12 == 10836
replace GB17_enepW12 = 2.465604 if districtW12 == 10837
replace GB17_enepW12 = 2.694124 if districtW12 == 10838
replace GB17_enepW12 = 2.103961 if districtW12 == 10839
replace GB17_enepW12 = 2.204533 if districtW12 == 10840
replace GB17_enepW12 = 2.188351 if districtW12 == 10841
replace GB17_enepW12 = 2.085183 if districtW12 == 10842
replace GB17_enepW12 = 2.308006 if districtW12 == 10843
replace GB17_enepW12 = 2.105466 if districtW12 == 10844
replace GB17_enepW12 = 2.310302 if districtW12 == 10845
replace GB17_enepW12 = 2.405492 if districtW12 == 10846
replace GB17_enepW12 = 2.28921 if districtW12 == 10847
replace GB17_enepW12 = 2.393573 if districtW12 == 10848
replace GB17_enepW12 = 2.143306 if districtW12 == 10849
replace GB17_enepW12 = 2.638262 if districtW12 == 10850
replace GB17_enepW12 = 2.287277 if districtW12 == 10851
replace GB17_enepW12 = 2.299315 if districtW12 == 10852
replace GB17_enepW12 = 2.028852 if districtW12 == 10853
replace GB17_enepW12 = 2.099535 if districtW12 == 10854
replace GB17_enepW12 = 2.265543 if districtW12 == 10855
replace GB17_enepW12 = 2.468049 if districtW12 == 10856
replace GB17_enepW12 = 2.218655 if districtW12 == 10857
replace GB17_enepW12 = 2.200625 if districtW12 == 10858
replace GB17_enepW12 = 2.138994 if districtW12 == 10859
replace GB17_enepW12 = 2.34342 if districtW12 == 10860
replace GB17_enepW12 = 2.328338 if districtW12 == 10861
replace GB17_enepW12 = 2.40012 if districtW12 == 10862
replace GB17_enepW12 = 2.240351 if districtW12 == 10863
replace GB17_enepW12 = 2.131276 if districtW12 == 10864
replace GB17_enepW12 = 1.789284 if districtW12 == 10865
replace GB17_enepW12 = 2.162014 if districtW12 == 10866
replace GB17_enepW12 = 2.058377 if districtW12 == 10867
replace GB17_enepW12 = 2.282032 if districtW12 == 10868
replace GB17_enepW12 = 2.143017 if districtW12 == 10869
replace GB17_enepW12 = 2.282635 if districtW12 == 10870
replace GB17_enepW12 = 1.986361 if districtW12 == 10871
replace GB17_enepW12 = 2.164598 if districtW12 == 10872
replace GB17_enepW12 = 2.073927 if districtW12 == 10873
replace GB17_enepW12 = 2.583319 if districtW12 == 10874
replace GB17_enepW12 = 2.201624 if districtW12 == 10875
replace GB17_enepW12 = 2.484068 if districtW12 == 10876
replace GB17_enepW12 = 2.267808 if districtW12 == 10877
replace GB17_enepW12 = 2.2143 if districtW12 == 10878
replace GB17_enepW12 = 2.281806 if districtW12 == 10879
replace GB17_enepW12 = 2.246128 if districtW12 == 10880
replace GB17_enepW12 = 2.318914 if districtW12 == 10881
replace GB17_enepW12 = 2.005575 if districtW12 == 10882
replace GB17_enepW12 = 2.390003 if districtW12 == 10883
replace GB17_enepW12 = 2.939477 if districtW12 == 10884
replace GB17_enepW12 = 1.915446 if districtW12 == 10885
replace GB17_enepW12 = 2.251307 if districtW12 == 10886
replace GB17_enepW12 = 2.667052 if districtW12 == 10887
replace GB17_enepW12 = 1.970934 if districtW12 == 10888
replace GB17_enepW12 = 2.362307 if districtW12 == 10889
replace GB17_enepW12 = 2.321747 if districtW12 == 10890
replace GB17_enepW12 = 2.35287 if districtW12 == 10891
replace GB17_enepW12 = 2.45245 if districtW12 == 10892
replace GB17_enepW12 = 2.469802 if districtW12 == 10893
replace GB17_enepW12 = 2.205554 if districtW12 == 10894
replace GB17_enepW12 = 2.129848 if districtW12 == 10895
replace GB17_enepW12 = 2.40812 if districtW12 == 10896
replace GB17_enepW12 = 2.35183 if districtW12 == 10897
replace GB17_enepW12 = 2.330394 if districtW12 == 10898
replace GB17_enepW12 = 2.630721 if districtW12 == 10899
replace GB17_enepW12 = 2.186886 if districtW12 == 10900
replace GB17_enepW12 = 2.444156 if districtW12 == 10901
replace GB17_enepW12 = 2.187856 if districtW12 == 10902
replace GB17_enepW12 = 2.496973 if districtW12 == 10903
replace GB17_enepW12 = 2.502902 if districtW12 == 10904
replace GB17_enepW12 = 2.247854 if districtW12 == 10905
replace GB17_enepW12 = 2.32461 if districtW12 == 10906
replace GB17_enepW12 = 2.245392 if districtW12 == 10907
replace GB17_enepW12 = 2.395629 if districtW12 == 10908
replace GB17_enepW12 = 2.198238 if districtW12 == 10909
replace GB17_enepW12 = 2.243962 if districtW12 == 10910
replace GB17_enepW12 = 2.01741 if districtW12 == 10911
replace GB17_enepW12 = 2.404034 if districtW12 == 10912
replace GB17_enepW12 = 2.444658 if districtW12 == 10913
replace GB17_enepW12 = 2.169204 if districtW12 == 10914
replace GB17_enepW12 = 2.282858 if districtW12 == 10915
replace GB17_enepW12 = 1.97052 if districtW12 == 10916
replace GB17_enepW12 = 2.155745 if districtW12 == 10917
replace GB17_enepW12 = 2.176269 if districtW12 == 10918
replace GB17_enepW12 = 1.887884 if districtW12 == 10919
replace GB17_enepW12 = 2.237126 if districtW12 == 10920
replace GB17_enepW12 = 1.979931 if districtW12 == 10921
replace GB17_enepW12 = 3.083174 if districtW12 == 10922
replace GB17_enepW12 = 2.238938 if districtW12 == 10923
replace GB17_enepW12 = 2.264125 if districtW12 == 10924
replace GB17_enepW12 = 2.236892 if districtW12 == 10925
replace GB17_enepW12 = 2.472413 if districtW12 == 10926
replace GB17_enepW12 = 2.184261 if districtW12 == 10927
replace GB17_enepW12 = 2.095016 if districtW12 == 10928
replace GB17_enepW12 = 2.0745 if districtW12 == 10929
replace GB17_enepW12 = 2.011071 if districtW12 == 10930
replace GB17_enepW12 = 2.431633 if districtW12 == 10931
replace GB17_enepW12 = 2.523471 if districtW12 == 10932
replace GB17_enepW12 = 2.301055 if districtW12 == 10933
replace GB17_enepW12 = 2.647134 if districtW12 == 10934
replace GB17_enepW12 = 2.101382 if districtW12 == 10935
replace GB17_enepW12 = 2.307671 if districtW12 == 10936
replace GB17_enepW12 = 2.518115 if districtW12 == 10937
replace GB17_enepW12 = 2.52059 if districtW12 == 10938
replace GB17_enepW12 = 1.873835 if districtW12 == 10939
replace GB17_enepW12 = 2.165631 if districtW12 == 10940
replace GB17_enepW12 = 2.261467 if districtW12 == 10941
replace GB17_enepW12 = 2.133088 if districtW12 == 10942
replace GB17_enepW12 = 2.29312 if districtW12 == 10943
replace GB17_enepW12 = 2.210005 if districtW12 == 10944
replace GB17_enepW12 = 1.812005 if districtW12 == 10945
replace GB17_enepW12 = 2.228081 if districtW12 == 10946
replace GB17_enepW12 = 2.344279 if districtW12 == 10947
replace GB17_enepW12 = 2.459598 if districtW12 == 10948
replace GB17_enepW12 = 2.138323 if districtW12 == 10949
replace GB17_enepW12 = 2.21377 if districtW12 == 10950
replace GB17_enepW12 = 2.403015 if districtW12 == 10951
replace GB17_enepW12 = 2.102297 if districtW12 == 10952
replace GB17_enepW12 = 2.655219 if districtW12 == 10953
replace GB17_enepW12 = 2.270306 if districtW12 == 10954
replace GB17_enepW12 = 2.302431 if districtW12 == 10955
replace GB17_enepW12 = 2.161747 if districtW12 == 10956
replace GB17_enepW12 = 2.359314 if districtW12 == 10957
replace GB17_enepW12 = 3.068241 if districtW12 == 10958
replace GB17_enepW12 = 2.346343 if districtW12 == 10959
replace GB17_enepW12 = 2.906279 if districtW12 == 10960
replace GB17_enepW12 = 2.662782 if districtW12 == 10961
replace GB17_enepW12 = 2.071776 if districtW12 == 10962
replace GB17_enepW12 = 1.955049 if districtW12 == 10963
replace GB17_enepW12 = 2.57734 if districtW12 == 10964
replace GB17_enepW12 = 2.173963 if districtW12 == 10965
replace GB17_enepW12 = 2.196275 if districtW12 == 10966
replace GB17_enepW12 = 2.111857 if districtW12 == 10967
replace GB17_enepW12 = 2.255591 if districtW12 == 10968
replace GB17_enepW12 = 2.067456 if districtW12 == 10969
replace GB17_enepW12 = 2.179937 if districtW12 == 10970
replace GB17_enepW12 = 2.195531 if districtW12 == 10971
replace GB17_enepW12 = 2.342739 if districtW12 == 10972
replace GB17_enepW12 = 2.151636 if districtW12 == 10973
replace GB17_enepW12 = 2.143434 if districtW12 == 10974
replace GB17_enepW12 = 2.075442 if districtW12 == 10975
replace GB17_enepW12 = 2.241133 if districtW12 == 10976
replace GB17_enepW12 = 2.184214 if districtW12 == 10977
replace GB17_enepW12 = 1.923499 if districtW12 == 10978
replace GB17_enepW12 = 1.912821 if districtW12 == 10979
replace GB17_enepW12 = 2.306232 if districtW12 == 10980
replace GB17_enepW12 = 2.293996 if districtW12 == 10981
replace GB17_enepW12 = 2.357498 if districtW12 == 10982
replace GB17_enepW12 = 2.129001 if districtW12 == 10983
replace GB17_enepW12 = 2.667239 if districtW12 == 10984
replace GB17_enepW12 = 2.100803 if districtW12 == 10985
replace GB17_enepW12 = 2.018903 if districtW12 == 10986
replace GB17_enepW12 = 2.31015 if districtW12 == 10987
replace GB17_enepW12 = 2.628185 if districtW12 == 10988
replace GB17_enepW12 = 2.172008 if districtW12 == 10989
replace GB17_enepW12 = 2.343004 if districtW12 == 10990
replace GB17_enepW12 = 2.337932 if districtW12 == 10991
replace GB17_enepW12 = 2.273291 if districtW12 == 10992
replace GB17_enepW12 = 2.302235 if districtW12 == 10993
replace GB17_enepW12 = 2.38756 if districtW12 == 10994
replace GB17_enepW12 = 2.878877 if districtW12 == 10995
replace GB17_enepW12 = 2.185543 if districtW12 == 10996
replace GB17_enepW12 = 2.163944 if districtW12 == 10997
replace GB17_enepW12 = 2.136452 if districtW12 == 10998
replace GB17_enepW12 = 2.643803 if districtW12 == 10999
replace GB17_enepW12 = 2.507517 if districtW12 == 11000
replace GB17_enepW12 = 2.63966 if districtW12 == 11001
replace GB17_enepW12 = 1.469334 if districtW12 == 11002
replace GB17_enepW12 = 2.767881 if districtW12 == 11003
replace GB17_enepW12 = 2.464078 if districtW12 == 11004
replace GB17_enepW12 = 2.318186 if districtW12 == 11005
replace GB17_enepW12 = 2.178325 if districtW12 == 11006
replace GB17_enepW12 = 2.374825 if districtW12 == 11007
replace GB17_enepW12 = 2.457939 if districtW12 == 11008
replace GB17_enepW12 = 2.222423 if districtW12 == 11009
replace GB17_enepW12 = 1.76808 if districtW12 == 11010
replace GB17_enepW12 = 2.306994 if districtW12 == 11011
replace GB17_enepW12 = 2.130349 if districtW12 == 11012
replace GB17_enepW12 = 1.491336 if districtW12 == 11013
replace GB17_enepW12 = 2.274529 if districtW12 == 11014
replace GB17_enepW12 = 2.579165 if districtW12 == 11015
replace GB17_enepW12 = 1.918404 if districtW12 == 11016
replace GB17_enepW12 = 2.202906 if districtW12 == 11017
replace GB17_enepW12 = 2.307646 if districtW12 == 11018
replace GB17_enepW12 = 2.388419 if districtW12 == 11019
replace GB17_enepW12 = 2.186958 if districtW12 == 11020
replace GB17_enepW12 = 2.540758 if districtW12 == 11021
replace GB17_enepW12 = 2.303468 if districtW12 == 11022
replace GB17_enepW12 = 2.28915 if districtW12 == 11023
replace GB17_enepW12 = 2.184278 if districtW12 == 11024
replace GB17_enepW12 = 2.230628 if districtW12 == 11025
replace GB17_enepW12 = 2.459506 if districtW12 == 11026
replace GB17_enepW12 = 2.485051 if districtW12 == 11027
replace GB17_enepW12 = 1.918731 if districtW12 == 11028
replace GB17_enepW12 = 2.071431 if districtW12 == 11029
replace GB17_enepW12 = 2.310116 if districtW12 == 11030
replace GB17_enepW12 = 2.516495 if districtW12 == 11031
replace GB17_enepW12 = 1.621276 if districtW12 == 11032
replace GB17_enepW12 = 2.052349 if districtW12 == 11033
replace GB17_enepW12 = 2.184448 if districtW12 == 11034
replace GB17_enepW12 = 2.251905 if districtW12 == 11035
replace GB17_enepW12 = 2.115628 if districtW12 == 11036
replace GB17_enepW12 = 2.409356 if districtW12 == 11037
replace GB17_enepW12 = 2.505666 if districtW12 == 11038
replace GB17_enepW12 = 2.117923 if districtW12 == 11039
replace GB17_enepW12 = 2.746009 if districtW12 == 11040
replace GB17_enepW12 = 2.493002 if districtW12 == 11041
replace GB17_enepW12 = 2.093132 if districtW12 == 11042
replace GB17_enepW12 = 2.085988 if districtW12 == 11043
replace GB17_enepW12 = 2.114856 if districtW12 == 11044
replace GB17_enepW12 = 2.049009 if districtW12 == 11045
replace GB17_enepW12 = 2.540735 if districtW12 == 11046
replace GB17_enepW12 = 2.620387 if districtW12 == 11047
replace GB17_enepW12 = 2.439631 if districtW12 == 11048
replace GB17_enepW12 = 2.257192 if districtW12 == 11049
replace GB17_enepW12 = 2.163118 if districtW12 == 11050
replace GB17_enepW12 = 2.272487 if districtW12 == 11051
replace GB17_enepW12 = 2.378237 if districtW12 == 11052
replace GB17_enepW12 = 2.283342 if districtW12 == 11053
replace GB17_enepW12 = 2.09913 if districtW12 == 11054
replace GB17_enepW12 = 2.372007 if districtW12 == 11055
replace GB17_enepW12 = 2.50124 if districtW12 == 11056
replace GB17_enepW12 = 2.150325 if districtW12 == 11057
replace GB17_enepW12 = 2.229347 if districtW12 == 11058
replace GB17_enepW12 = 2.09573 if districtW12 == 11059
replace GB17_enepW12 = 2.491919 if districtW12 == 11060
replace GB17_enepW12 = 1.931056 if districtW12 == 11061
replace GB17_enepW12 = 2.457938 if districtW12 == 11062
replace GB17_enepW12 = 2.26035 if districtW12 == 40001
replace GB17_enepW12 = 2.545037 if districtW12 == 40002
replace GB17_enepW12 = 4.481795 if districtW12 == 40003
replace GB17_enepW12 = 2.088722 if districtW12 == 40004
replace GB17_enepW12 = 2.647678 if districtW12 == 40005
replace GB17_enepW12 = 3.098388 if districtW12 == 40006
replace GB17_enepW12 = 2.311519 if districtW12 == 40007
replace GB17_enepW12 = 2.943556 if districtW12 == 40008
replace GB17_enepW12 = 2.485401 if districtW12 == 40009
replace GB17_enepW12 = 2.60507 if districtW12 == 40010
replace GB17_enepW12 = 3.068544 if districtW12 == 40011
replace GB17_enepW12 = 2.573709 if districtW12 == 40012
replace GB17_enepW12 = 3.040342 if districtW12 == 40013
replace GB17_enepW12 = 3.542819 if districtW12 == 40014
replace GB17_enepW12 = 3.162837 if districtW12 == 40015
replace GB17_enepW12 = 2.356214 if districtW12 == 40016
replace GB17_enepW12 = 3.324221 if districtW12 == 40017
replace GB17_enepW12 = 2.856021 if districtW12 == 40018
replace GB17_enepW12 = 3.182578 if districtW12 == 20001
replace GB17_enepW12 = 3.104562 if districtW12 == 20002
replace GB17_enepW12 = 3.000885 if districtW12 == 20003
replace GB17_enepW12 = 2.697778 if districtW12 == 20004
replace GB17_enepW12 = 3.460756 if districtW12 == 20005
replace GB17_enepW12 = 2.986931 if districtW12 == 20006
replace GB17_enepW12 = 2.543601 if districtW12 == 20007
replace GB17_enepW12 = 2.455543 if districtW12 == 20008
replace GB17_enepW12 = 3.573568 if districtW12 == 20009
replace GB17_enepW12 = 3.074989 if districtW12 == 20010
replace GB17_enepW12 = 2.76836 if districtW12 == 20011
replace GB17_enepW12 = 2.944706 if districtW12 == 20012
replace GB17_enepW12 = 2.971134 if districtW12 == 20013
replace GB17_enepW12 = 2.75218 if districtW12 == 20014
replace GB17_enepW12 = 3.052488 if districtW12 == 20015
replace GB17_enepW12 = 2.823787 if districtW12 == 20016
replace GB17_enepW12 = 3.27478 if districtW12 == 20017
replace GB17_enepW12 = 3.34636 if districtW12 == 20018
replace GB17_enepW12 = 3.157351 if districtW12 == 20019
replace GB17_enepW12 = 3.203635 if districtW12 == 20020
replace GB17_enepW12 = 3.037123 if districtW12 == 20021
replace GB17_enepW12 = 2.965182 if districtW12 == 20022
replace GB17_enepW12 = 3.449907 if districtW12 == 20023
replace GB17_enepW12 = 2.552764 if districtW12 == 20024
replace GB17_enepW12 = 3.211814 if districtW12 == 20025
replace GB17_enepW12 = 3.705678 if districtW12 == 20026
replace GB17_enepW12 = 3.207093 if districtW12 == 20027
replace GB17_enepW12 = 3.227978 if districtW12 == 20028
replace GB17_enepW12 = 2.717103 if districtW12 == 20029
replace GB17_enepW12 = 2.984024 if districtW12 == 20030
replace GB17_enepW12 = 3.41557 if districtW12 == 20031
replace GB17_enepW12 = 2.638514 if districtW12 == 20032
replace GB17_enepW12 = 2.912936 if districtW12 == 20033
replace GB17_enepW12 = 2.940403 if districtW12 == 20034
replace GB17_enepW12 = 2.822905 if districtW12 == 20035
replace GB17_enepW12 = 2.9189 if districtW12 == 20036
replace GB17_enepW12 = 3.106933 if districtW12 == 20037
replace GB17_enepW12 = 2.978525 if districtW12 == 20038
replace GB17_enepW12 = 3.40817 if districtW12 == 20039
replace GB17_enepW12 = 2.993202 if districtW12 == 20040
replace GB17_enepW12 = 3.102781 if districtW12 == 20041
replace GB17_enepW12 = 3.213736 if districtW12 == 20042
replace GB17_enepW12 = 3.176412 if districtW12 == 20043
replace GB17_enepW12 = 3.052871 if districtW12 == 20044
replace GB17_enepW12 = 3.157772 if districtW12 == 20045
replace GB17_enepW12 = 2.568854 if districtW12 == 20046
replace GB17_enepW12 = 3.00638 if districtW12 == 20047
replace GB17_enepW12 = 3.076488 if districtW12 == 20048
replace GB17_enepW12 = 3.528421 if districtW12 == 20049
replace GB17_enepW12 = 2.961596 if districtW12 == 20050
replace GB17_enepW12 = 2.931223 if districtW12 == 20051
replace GB17_enepW12 = 3.139852 if districtW12 == 20052
replace GB17_enepW12 = 3.083298 if districtW12 == 20053
replace GB17_enepW12 = 2.69463 if districtW12 == 20054
replace GB17_enepW12 = 3.537244 if districtW12 == 20055
replace GB17_enepW12 = 3.142722 if districtW12 == 20056
replace GB17_enepW12 = 3.101114 if districtW12 == 20057
replace GB17_enepW12 = 2.824909 if districtW12 == 20058
replace GB17_enepW12 = 2.812466 if districtW12 == 20059
replace GB17_enepW12 = 3.049034 if districtW12 == 30041
replace GB17_enepW12 = 2.241227 if districtW12 == 30042
replace GB17_enepW12 = 2.291618 if districtW12 == 30043
replace GB17_enepW12 = 2.311365 if districtW12 == 30044
replace GB17_enepW12 = 2.657645 if districtW12 == 30045
replace GB17_enepW12 = 2.309978 if districtW12 == 30046
replace GB17_enepW12 = 2.182444 if districtW12 == 30047
replace GB17_enepW12 = 2.111002 if districtW12 == 30048
replace GB17_enepW12 = 1.982805 if districtW12 == 30049
replace GB17_enepW12 = 2.234469 if districtW12 == 30050
replace GB17_enepW12 = 2.320142 if districtW12 == 30051
replace GB17_enepW12 = 2.122759 if districtW12 == 30052
replace GB17_enepW12 = 2.312661 if districtW12 == 30053
replace GB17_enepW12 = 2.386359 if districtW12 == 30054
replace GB17_enepW12 = 2.26024 if districtW12 == 30055
replace GB17_enepW12 = 2.326244 if districtW12 == 30056
replace GB17_enepW12 = 2.792168 if districtW12 == 30057
replace GB17_enepW12 = 2.557024 if districtW12 == 30058
replace GB17_enepW12 = 2.512804 if districtW12 == 30059
replace GB17_enepW12 = 2.231512 if districtW12 == 30060
replace GB17_enepW12 = 3.009493 if districtW12 == 30061
replace GB17_enepW12 = 2.412818 if districtW12 == 30062
replace GB17_enepW12 = 2.774345 if districtW12 == 30063
replace GB17_enepW12 = 4.095582 if districtW12 == 30064
replace GB17_enepW12 = 2.660415 if districtW12 == 30065
replace GB17_enepW12 = 2.600379 if districtW12 == 30066
replace GB17_enepW12 = 3.19205 if districtW12 == 30067
replace GB17_enepW12 = 2.828165 if districtW12 == 30068
replace GB17_enepW12 = 2.505577 if districtW12 == 30069
replace GB17_enepW12 = 2.321557 if districtW12 == 30070
replace GB17_enepW12 = 2.048278 if districtW12 == 30071
replace GB17_enepW12 = 2.469675 if districtW12 == 30072
replace GB17_enepW12 = 2.394053 if districtW12 == 30073
replace GB17_enepW12 = 2.174288 if districtW12 == 30074
replace GB17_enepW12 = 2.550946 if districtW12 == 30075
replace GB17_enepW12 = 2.615181 if districtW12 == 30076
replace GB17_enepW12 = 2.333968 if districtW12 == 30077
replace GB17_enepW12 = 2.402709 if districtW12 == 30078
replace GB17_enepW12 = 2.383412 if districtW12 == 30079
replace GB17_enepW12 = 2.231568 if districtW12 == 30080


********************************************
** COMPETITIVENESS: 2019 GENERAL ELECTION **
********************************************

* Margin of victory

gen GB19_marginW17 = .

replace GB19_marginW17 = 34.83685 if districtW17 == 10530
replace GB19_marginW17 = 50.4194 if districtW17 == 10531
replace GB19_marginW17 = 11.21012 if districtW17 == 10532
replace GB19_marginW17 = 37.05752 if districtW17 == 10533
replace GB19_marginW17 = 36.67437 if districtW17 == 10534
replace GB19_marginW17 = 11.70478 if districtW17 == 10535
replace GB19_marginW17 = 40.009 if districtW17 == 10536
replace GB19_marginW17 = 11.05005 if districtW17 == 10537
replace GB19_marginW17 = 28.67968 if districtW17 == 10538
replace GB19_marginW17 = 26.72081 if districtW17 == 10539
replace GB19_marginW17 = 34.6682 if districtW17 == 10540
replace GB19_marginW17 = 9.676719 if districtW17 == 10541
replace GB19_marginW17 = 8.450222 if districtW17 == 10542
replace GB19_marginW17 = 12.57221 if districtW17 == 10543
replace GB19_marginW17 = 46.25635 if districtW17 == 10544
replace GB19_marginW17 = 25.94995 if districtW17 == 10545
replace GB19_marginW17 = 27.5624 if districtW17 == 10546
replace GB19_marginW17 = 23.63343 if districtW17 == 10547
replace GB19_marginW17 = 6.660116 if districtW17 == 10548
replace GB19_marginW17 = 9.45029 if districtW17 == 10549
replace GB19_marginW17 = 27.15145 if districtW17 == 10550
replace GB19_marginW17 = 28.20295 if districtW17 == 10551
replace GB19_marginW17 = .3065497 if districtW17 == 10552
replace GB19_marginW17 = 27.51173 if districtW17 == 10553
replace GB19_marginW17 = 35.23 if districtW17 == 10554
replace GB19_marginW17 = 61.95965 if districtW17 == 10555
replace GB19_marginW17 = 38.19058 if districtW17 == 10556
replace GB19_marginW17 = 44.09829 if districtW17 == 10557
replace GB19_marginW17 = 30.29876 if districtW17 == 10558
replace GB19_marginW17 = 41.82711 if districtW17 == 10559
replace GB19_marginW17 = 13.26309 if districtW17 == 10560
replace GB19_marginW17 = 10.2217 if districtW17 == 10561
replace GB19_marginW17 = 53.87915 if districtW17 == 10562
replace GB19_marginW17 = 63.67353 if districtW17 == 10563
replace GB19_marginW17 = 67.86172 if districtW17 == 10564
replace GB19_marginW17 = 3.805283 if districtW17 == 10565
replace GB19_marginW17 = 36.34185 if districtW17 == 10566
replace GB19_marginW17 = 25.09552 if districtW17 == 10567
replace GB19_marginW17 = 24.9754 if districtW17 == 10568
replace GB19_marginW17 = 17.77033 if districtW17 == 10569
replace GB19_marginW17 = 40.91559 if districtW17 == 10570
replace GB19_marginW17 = 37.29349 if districtW17 == 10571
replace GB19_marginW17 = 22.15236 if districtW17 == 10572
replace GB19_marginW17 = 11.26649 if districtW17 == 10573
replace GB19_marginW17 = 12.10788 if districtW17 == 10574
replace GB19_marginW17 = 1.742578 if districtW17 == 10575
replace GB19_marginW17 = 43.93143 if districtW17 == 10576
replace GB19_marginW17 = 11.53511 if districtW17 == 10577
replace GB19_marginW17 = .8678496 if districtW17 == 10578
replace GB19_marginW17 = 18.71244 if districtW17 == 10579
replace GB19_marginW17 = 17.96219 if districtW17 == 10580
replace GB19_marginW17 = 70.2729 if districtW17 == 10581
replace GB19_marginW17 = 61.44714 if districtW17 == 10582
replace GB19_marginW17 = 46.56578 if districtW17 == 10583
replace GB19_marginW17 = 17.87149 if districtW17 == 10584
replace GB19_marginW17 = 22.07625 if districtW17 == 10585
replace GB19_marginW17 = 36.4839 if districtW17 == 10586
replace GB19_marginW17 = 41.06464 if districtW17 == 10587
replace GB19_marginW17 = 5.903223 if districtW17 == 10588
replace GB19_marginW17 = 61.04471 if districtW17 == 10589
replace GB19_marginW17 = 48.85839 if districtW17 == 10590
replace GB19_marginW17 = 42.47741 if districtW17 == 10591
replace GB19_marginW17 = 15.57278 if districtW17 == 10592
replace GB19_marginW17 = 18.02626 if districtW17 == 10593
replace GB19_marginW17 = 54.89244 if districtW17 == 10594
replace GB19_marginW17 = 42.39055 if districtW17 == 10595
replace GB19_marginW17 = 50.55297 if districtW17 == 10596
replace GB19_marginW17 = 16.60932 if districtW17 == 10597
replace GB19_marginW17 = 34.3805 if districtW17 == 10598
replace GB19_marginW17 = 20.6964 if districtW17 == 10599
replace GB19_marginW17 = 10.1852 if districtW17 == 10600
replace GB19_marginW17 = 17.8618 if districtW17 == 10601
replace GB19_marginW17 = 37.3623 if districtW17 == 10602
replace GB19_marginW17 = 38.36811 if districtW17 == 10603
replace GB19_marginW17 = 23.90159 if districtW17 == 10604
replace GB19_marginW17 = 42.57444 if districtW17 == 10605
replace GB19_marginW17 = 42.40783 if districtW17 == 10606
replace GB19_marginW17 = 9.645027 if districtW17 == 10607
replace GB19_marginW17 = 32.16458 if districtW17 == 10608
replace GB19_marginW17 = 3.46809 if districtW17 == 10609
replace GB19_marginW17 = 29.74271 if districtW17 == 10610
replace GB19_marginW17 = .2241611 if districtW17 == 10611
replace GB19_marginW17 = .7996172 if districtW17 == 10612
replace GB19_marginW17 = 40.3312 if districtW17 == 10613
replace GB19_marginW17 = 9.990832 if districtW17 == 10614
replace GB19_marginW17 = 59.79608 if districtW17 == 10615
replace GB19_marginW17 = 17.27322 if districtW17 == 10616
replace GB19_marginW17 = 17.94003 if districtW17 == 10617
replace GB19_marginW17 = 42.92316 if districtW17 == 10618
replace GB19_marginW17 = 3.054246 if districtW17 == 10619
replace GB19_marginW17 = 19.40382 if districtW17 == 10620
replace GB19_marginW17 = 1.281112 if districtW17 == 10621
replace GB19_marginW17 = 60.15313 if districtW17 == 10622
replace GB19_marginW17 = 30.51557 if districtW17 == 10623
replace GB19_marginW17 = 41.584 if districtW17 == 10624
replace GB19_marginW17 = 40.45335 if districtW17 == 10625
replace GB19_marginW17 = 42.77803 if districtW17 == 10626
replace GB19_marginW17 = 4.178667 if districtW17 == 10627
replace GB19_marginW17 = 30.84801 if districtW17 == 10628
replace GB19_marginW17 = 24.00846 if districtW17 == 10629
replace GB19_marginW17 = 1.652712 if districtW17 == 10630
replace GB19_marginW17 = 29.13352 if districtW17 == 10631
replace GB19_marginW17 = 3.21117 if districtW17 == 10632
replace GB19_marginW17 = 35.08972 if districtW17 == 10633
replace GB19_marginW17 = 2.605069 if districtW17 == 10634
replace GB19_marginW17 = 19.76917 if districtW17 == 10635
replace GB19_marginW17 = 2.105299 if districtW17 == 10636
replace GB19_marginW17 = 43.62177 if districtW17 == 10637
replace GB19_marginW17 = 47.38504 if districtW17 == 10638
replace GB19_marginW17 = 9.252628 if districtW17 == 10639
replace GB19_marginW17 = 11.29766 if districtW17 == 10640
replace GB19_marginW17 = 10.28469 if districtW17 == 10641
replace GB19_marginW17 = 56.77838 if districtW17 == 10642
replace GB19_marginW17 = 46.22025 if districtW17 == 10643
replace GB19_marginW17 = 17.65499 if districtW17 == 10644
replace GB19_marginW17 = 8.38041 if districtW17 == 10645
replace GB19_marginW17 = 32.43059 if districtW17 == 10646
replace GB19_marginW17 = 13.73845 if districtW17 == 10647
replace GB19_marginW17 = 16.97892 if districtW17 == 10648
replace GB19_marginW17 = 17.30717 if districtW17 == 10649
replace GB19_marginW17 = .4356563 if districtW17 == 10650
replace GB19_marginW17 = .8902401 if districtW17 == 10651
replace GB19_marginW17 = 16.75384 if districtW17 == 10652
replace GB19_marginW17 = 15.74623 if districtW17 == 10653
replace GB19_marginW17 = 11.0075 if districtW17 == 10654
replace GB19_marginW17 = 44.36872 if districtW17 == 10655
replace GB19_marginW17 = 20.78743 if districtW17 == 10656
replace GB19_marginW17 = .6699443 if districtW17 == 10657
replace GB19_marginW17 = 7.572761 if districtW17 == 10658
replace GB19_marginW17 = 35.46637 if districtW17 == 10659
replace GB19_marginW17 = 45.43316 if districtW17 == 10660
replace GB19_marginW17 = 16.00238 if districtW17 == 10661
replace GB19_marginW17 = 5.4023 if districtW17 == 10662
replace GB19_marginW17 = 14.17503 if districtW17 == 10663
replace GB19_marginW17 = 34.75088 if districtW17 == 10664
replace GB19_marginW17 = 47.08757 if districtW17 == 10665
replace GB19_marginW17 = 2.768269 if districtW17 == 10666
replace GB19_marginW17 = 7.989082 if districtW17 == 10667
replace GB19_marginW17 = 5.478466 if districtW17 == 10668
replace GB19_marginW17 = 5.823383 if districtW17 == 10669
replace GB19_marginW17 = 24.21648 if districtW17 == 10670
replace GB19_marginW17 = 31.43878 if districtW17 == 10671
replace GB19_marginW17 = 42.55523 if districtW17 == 10672
replace GB19_marginW17 = 48.96196 if districtW17 == 10673
replace GB19_marginW17 = 24.26697 if districtW17 == 10674
replace GB19_marginW17 = 24.72044 if districtW17 == 10675
replace GB19_marginW17 = 38.0984 if districtW17 == 10676
replace GB19_marginW17 = 19.02958 if districtW17 == 10677
replace GB19_marginW17 = 10.46931 if districtW17 == 10678
replace GB19_marginW17 = 60.73076 if districtW17 == 10679
replace GB19_marginW17 = 34.61815 if districtW17 == 10680
replace GB19_marginW17 = 40.27475 if districtW17 == 10681
replace GB19_marginW17 = 14.06791 if districtW17 == 10682
replace GB19_marginW17 = 43.18255 if districtW17 == 10683
replace GB19_marginW17 = 7.855406 if districtW17 == 10684
replace GB19_marginW17 = 26.46555 if districtW17 == 10685
replace GB19_marginW17 = 34.81716 if districtW17 == 10686
replace GB19_marginW17 = 39.69907 if districtW17 == 10687
replace GB19_marginW17 = 17.97891 if districtW17 == 10688
replace GB19_marginW17 = 29.80335 if districtW17 == 10689
replace GB19_marginW17 = 7.317633 if districtW17 == 10690
replace GB19_marginW17 = 14.41066 if districtW17 == 10691
replace GB19_marginW17 = 9.41281 if districtW17 == 10692
replace GB19_marginW17 = 44.10957 if districtW17 == 10693
replace GB19_marginW17 = 30.06342 if districtW17 == 10694
replace GB19_marginW17 = 21.72738 if districtW17 == 10695
replace GB19_marginW17 = 9.080803 if districtW17 == 10696
replace GB19_marginW17 = 4.348171 if districtW17 == 10697
replace GB19_marginW17 = 18.51331 if districtW17 == 10698
replace GB19_marginW17 = 45.56507 if districtW17 == 10699
replace GB19_marginW17 = 43.60837 if districtW17 == 10700
replace GB19_marginW17 = 16.43764 if districtW17 == 10701
replace GB19_marginW17 = 10.5038 if districtW17 == 10702
replace GB19_marginW17 = 11.90731 if districtW17 == 10703
replace GB19_marginW17 = 36.16134 if districtW17 == 10704
replace GB19_marginW17 = 30.82856 if districtW17 == 10705
replace GB19_marginW17 = 35.60085 if districtW17 == 10706
replace GB19_marginW17 = 44.99275 if districtW17 == 10707
replace GB19_marginW17 = 59.30315 if districtW17 == 10708
replace GB19_marginW17 = 18.87534 if districtW17 == 10709
replace GB19_marginW17 = 1.359278 if districtW17 == 10710
replace GB19_marginW17 = 32.89743 if districtW17 == 10711
replace GB19_marginW17 = 19.11502 if districtW17 == 10712
replace GB19_marginW17 = 48.04243 if districtW17 == 10713
replace GB19_marginW17 = 46.43144 if districtW17 == 10714
replace GB19_marginW17 = 32.76072 if districtW17 == 10715
replace GB19_marginW17 = 22.15674 if districtW17 == 10716
replace GB19_marginW17 = 40.6401 if districtW17 == 10717
replace GB19_marginW17 = 34.75904 if districtW17 == 10718
replace GB19_marginW17 = 5.689588 if districtW17 == 10719
replace GB19_marginW17 = 58.36382 if districtW17 == 10720
replace GB19_marginW17 = 62.42767 if districtW17 == 10721
replace GB19_marginW17 = 28.5134 if districtW17 == 10722
replace GB19_marginW17 = 5.529726 if districtW17 == 10723
replace GB19_marginW17 = 40.83851 if districtW17 == 10724
replace GB19_marginW17 = 41.06876 if districtW17 == 10725
replace GB19_marginW17 = 34.34361 if districtW17 == 10726
replace GB19_marginW17 = 24.72423 if districtW17 == 10727
replace GB19_marginW17 = 30.14358 if districtW17 == 10728
replace GB19_marginW17 = 32.43761 if districtW17 == 10729
replace GB19_marginW17 = 16.99246 if districtW17 == 10730
replace GB19_marginW17 = 16.50805 if districtW17 == 10731
replace GB19_marginW17 = 18.13781 if districtW17 == 10732
replace GB19_marginW17 = 8.760386 if districtW17 == 10733
replace GB19_marginW17 = 38.83917 if districtW17 == 10734
replace GB19_marginW17 = 7.44924 if districtW17 == 10735
replace GB19_marginW17 = 47.41618 if districtW17 == 10736
replace GB19_marginW17 = 21.0506 if districtW17 == 10737
replace GB19_marginW17 = 9.99119 if districtW17 == 10738
replace GB19_marginW17 = 28.40397 if districtW17 == 10739
replace GB19_marginW17 = 2.687496 if districtW17 == 10740
replace GB19_marginW17 = 7.680437 if districtW17 == 10741
replace GB19_marginW17 = 23.91634 if districtW17 == 10742
replace GB19_marginW17 = 39.65274 if districtW17 == 10743
replace GB19_marginW17 = 32.64885 if districtW17 == 10744
replace GB19_marginW17 = 40.82715 if districtW17 == 10745
replace GB19_marginW17 = 22.85807 if districtW17 == 10746
replace GB19_marginW17 = 1.39614 if districtW17 == 10747
replace GB19_marginW17 = 1.089105 if districtW17 == 10748
replace GB19_marginW17 = 11.71205 if districtW17 == 10749
replace GB19_marginW17 = 48.89057 if districtW17 == 10750
replace GB19_marginW17 = 43.18375 if districtW17 == 10751
replace GB19_marginW17 = 31.49006 if districtW17 == 10752
replace GB19_marginW17 = 33.4066 if districtW17 == 10753
replace GB19_marginW17 = 7.824471 if districtW17 == 10754
replace GB19_marginW17 = 30.22468 if districtW17 == 10755
replace GB19_marginW17 = 11.78788 if districtW17 == 10756
replace GB19_marginW17 = 32.77089 if districtW17 == 10757
replace GB19_marginW17 = 6.95892 if districtW17 == 10758
replace GB19_marginW17 = 10.41226 if districtW17 == 10759
replace GB19_marginW17 = 45.06797 if districtW17 == 10760
replace GB19_marginW17 = 11.05105 if districtW17 == 10761
replace GB19_marginW17 = 31.88657 if districtW17 == 10762
replace GB19_marginW17 = 48.67206 if districtW17 == 10763
replace GB19_marginW17 = 36.23891 if districtW17 == 10764
replace GB19_marginW17 = 17.4784 if districtW17 == 10765
replace GB19_marginW17 = 4.216731 if districtW17 == 10766
replace GB19_marginW17 = 38.69613 if districtW17 == 10767
replace GB19_marginW17 = .3427625 if districtW17 == 10768
replace GB19_marginW17 = 33.96407 if districtW17 == 10769
replace GB19_marginW17 = 17.2386 if districtW17 == 10770
replace GB19_marginW17 = 3.819123 if districtW17 == 10771
replace GB19_marginW17 = 22.19981 if districtW17 == 10772
replace GB19_marginW17 = 9.108305 if districtW17 == 10773
replace GB19_marginW17 = 22.75216 if districtW17 == 10774
replace GB19_marginW17 = 72.70377 if districtW17 == 10775
replace GB19_marginW17 = 5.263275 if districtW17 == 10776
replace GB19_marginW17 = 39.09991 if districtW17 == 10777
replace GB19_marginW17 = 14.16317 if districtW17 == 10778
replace GB19_marginW17 = 33.8396 if districtW17 == 10779
replace GB19_marginW17 = 21.81077 if districtW17 == 10780
replace GB19_marginW17 = 26.22576 if districtW17 == 10781
replace GB19_marginW17 = 12.17904 if districtW17 == 10782
replace GB19_marginW17 = 45.21706 if districtW17 == 10783
replace GB19_marginW17 = 12.11215 if districtW17 == 10784
replace GB19_marginW17 = 4.18272 if districtW17 == 10785
replace GB19_marginW17 = 4.479405 if districtW17 == 10786
replace GB19_marginW17 = 37.95158 if districtW17 == 10787
replace GB19_marginW17 = 41.34933 if districtW17 == 10788
replace GB19_marginW17 = 59.44408 if districtW17 == 10789
replace GB19_marginW17 = 46.71022 if districtW17 == 10790
replace GB19_marginW17 = 43.77975 if districtW17 == 10791
replace GB19_marginW17 = 6.940687 if districtW17 == 10792
replace GB19_marginW17 = 70.17181 if districtW17 == 10793
replace GB19_marginW17 = 74.8296 if districtW17 == 10794
replace GB19_marginW17 = 62.44093 if districtW17 == 10795
replace GB19_marginW17 = 68.1625 if districtW17 == 10796
replace GB19_marginW17 = 13.12259 if districtW17 == 10797
replace GB19_marginW17 = 55.16319 if districtW17 == 10798
replace GB19_marginW17 = 47.08412 if districtW17 == 10799
replace GB19_marginW17 = 21.71218 if districtW17 == 10800
replace GB19_marginW17 = 20.8159 if districtW17 == 10801
replace GB19_marginW17 = 19.88416 if districtW17 == 10802
replace GB19_marginW17 = 33.36048 if districtW17 == 10803
replace GB19_marginW17 = 42.12849 if districtW17 == 10804
replace GB19_marginW17 = 10.70969 if districtW17 == 10805
replace GB19_marginW17 = 59.5957 if districtW17 == 10806
replace GB19_marginW17 = 55.6312 if districtW17 == 10807
replace GB19_marginW17 = 68.10866 if districtW17 == 10808
replace GB19_marginW17 = 52.65591 if districtW17 == 10809
replace GB19_marginW17 = 33.09317 if districtW17 == 10810
replace GB19_marginW17 = 42.96084 if districtW17 == 10811
replace GB19_marginW17 = 42.16318 if districtW17 == 10812
replace GB19_marginW17 = 38.11055 if districtW17 == 10813
replace GB19_marginW17 = 31.17149 if districtW17 == 10814
replace GB19_marginW17 = 30.44758 if districtW17 == 10815
replace GB19_marginW17 = 40.21286 if districtW17 == 10816
replace GB19_marginW17 = 28.99366 if districtW17 == 10817
replace GB19_marginW17 = 49.92249 if districtW17 == 10818
replace GB19_marginW17 = 24.62094 if districtW17 == 10819
replace GB19_marginW17 = 24.31353 if districtW17 == 10820
replace GB19_marginW17 = 10.00112 if districtW17 == 10821
replace GB19_marginW17 = 10.84881 if districtW17 == 10822
replace GB19_marginW17 = 36.03332 if districtW17 == 10823
replace GB19_marginW17 = 21.08387 if districtW17 == 10824
replace GB19_marginW17 = 14.0234 if districtW17 == 10825
replace GB19_marginW17 = 21.69652 if districtW17 == 10826
replace GB19_marginW17 = 49.72039 if districtW17 == 10827
replace GB19_marginW17 = 48.50912 if districtW17 == 10828
replace GB19_marginW17 = 39.83784 if districtW17 == 10829
replace GB19_marginW17 = 26.74589 if districtW17 == 10830
replace GB19_marginW17 = 32.76405 if districtW17 == 10831
replace GB19_marginW17 = 35.65779 if districtW17 == 10832
replace GB19_marginW17 = 12.26622 if districtW17 == 10833
replace GB19_marginW17 = 16.6432 if districtW17 == 10834
replace GB19_marginW17 = 33.29972 if districtW17 == 10835
replace GB19_marginW17 = 2.644068 if districtW17 == 10836
replace GB19_marginW17 = 28.54599 if districtW17 == 10837
replace GB19_marginW17 = 26.6512 if districtW17 == 10838
replace GB19_marginW17 = 43.31189 if districtW17 == 10839
replace GB19_marginW17 = 11.2383 if districtW17 == 10840
replace GB19_marginW17 = 37.34812 if districtW17 == 10841
replace GB19_marginW17 = 56.62903 if districtW17 == 10842
replace GB19_marginW17 = 26.16169 if districtW17 == 10843
replace GB19_marginW17 = 34.09988 if districtW17 == 10844
replace GB19_marginW17 = 32.87545 if districtW17 == 10845
replace GB19_marginW17 = 26.15792 if districtW17 == 10846
replace GB19_marginW17 = 48.70574 if districtW17 == 10847
replace GB19_marginW17 = 28.32379 if districtW17 == 10848
replace GB19_marginW17 = 40.60836 if districtW17 == 10849
replace GB19_marginW17 = 28.2588 if districtW17 == 10850
replace GB19_marginW17 = 29.34047 if districtW17 == 10851
replace GB19_marginW17 = 35.67811 if districtW17 == 10852
replace GB19_marginW17 = 18.95933 if districtW17 == 10853
replace GB19_marginW17 = 39.1079 if districtW17 == 10854
replace GB19_marginW17 = 40.26312 if districtW17 == 10855
replace GB19_marginW17 = 2.400187 if districtW17 == 10856
replace GB19_marginW17 = 44.65189 if districtW17 == 10857
replace GB19_marginW17 = 37.90342 if districtW17 == 10858
replace GB19_marginW17 = 42.74924 if districtW17 == 10859
replace GB19_marginW17 = 32.18891 if districtW17 == 10860
replace GB19_marginW17 = 13.92802 if districtW17 == 10861
replace GB19_marginW17 = 11.50239 if districtW17 == 10862
replace GB19_marginW17 = 10.23658 if districtW17 == 10863
replace GB19_marginW17 = 24.69375 if districtW17 == 10864
replace GB19_marginW17 = 43.47815 if districtW17 == 10865
replace GB19_marginW17 = 12.71234 if districtW17 == 10866
replace GB19_marginW17 = 26.11044 if districtW17 == 10867
replace GB19_marginW17 = 29.08608 if districtW17 == 10868
replace GB19_marginW17 = 41.07054 if districtW17 == 10869
replace GB19_marginW17 = 3.247121 if districtW17 == 10870
replace GB19_marginW17 = 25.04164 if districtW17 == 10871
replace GB19_marginW17 = 45.93091 if districtW17 == 10872
replace GB19_marginW17 = 36.12715 if districtW17 == 10873
replace GB19_marginW17 = 15.20298 if districtW17 == 10874
replace GB19_marginW17 = 13.91363 if districtW17 == 10875
replace GB19_marginW17 = 14.55978 if districtW17 == 10876
replace GB19_marginW17 = 38.72324 if districtW17 == 10877
replace GB19_marginW17 = 5.397377 if districtW17 == 10878
replace GB19_marginW17 = 29.15301 if districtW17 == 10879
replace GB19_marginW17 = 8.945766 if districtW17 == 10880
replace GB19_marginW17 = 37.89023 if districtW17 == 10881
replace GB19_marginW17 = 47.17018 if districtW17 == 10882
replace GB19_marginW17 = 34.3716 if districtW17 == 10883
replace GB19_marginW17 = 11.30838 if districtW17 == 10884
replace GB19_marginW17 = 35.94555 if districtW17 == 10885
replace GB19_marginW17 = 6.487134 if districtW17 == 10886
replace GB19_marginW17 = 9.459647 if districtW17 == 10887
replace GB19_marginW17 = 56.46527 if districtW17 == 10888
replace GB19_marginW17 = 10.59408 if districtW17 == 10889
replace GB19_marginW17 = 8.169949 if districtW17 == 10890
replace GB19_marginW17 = 8.635717 if districtW17 == 10891
replace GB19_marginW17 = 36.39005 if districtW17 == 10892
replace GB19_marginW17 = 34.44579 if districtW17 == 10893
replace GB19_marginW17 = 33.35323 if districtW17 == 10894
replace GB19_marginW17 = 47.15526 if districtW17 == 10895
replace GB19_marginW17 = 11.93539 if districtW17 == 10896
replace GB19_marginW17 = 20.37642 if districtW17 == 10897
replace GB19_marginW17 = 32.87756 if districtW17 == 10898
replace GB19_marginW17 = 26.62997 if districtW17 == 10899
replace GB19_marginW17 = 37.88402 if districtW17 == 10900
replace GB19_marginW17 = 21.15587 if districtW17 == 10901
replace GB19_marginW17 = 19.5035 if districtW17 == 10902
replace GB19_marginW17 = 12.97384 if districtW17 == 10903
replace GB19_marginW17 = 8.754313 if districtW17 == 10904
replace GB19_marginW17 = 26.46318 if districtW17 == 10905
replace GB19_marginW17 = 30.9882 if districtW17 == 10906
replace GB19_marginW17 = 34.28475 if districtW17 == 10907
replace GB19_marginW17 = 12.63202 if districtW17 == 10908
replace GB19_marginW17 = 46.1739 if districtW17 == 10909
replace GB19_marginW17 = 43.74029 if districtW17 == 10910
replace GB19_marginW17 = 32.24641 if districtW17 == 10911
replace GB19_marginW17 = 36.73181 if districtW17 == 10912
replace GB19_marginW17 = 20.65401 if districtW17 == 10913
replace GB19_marginW17 = 17.08874 if districtW17 == 10914
replace GB19_marginW17 = 10.85743 if districtW17 == 10915
replace GB19_marginW17 = 29.72091 if districtW17 == 10916
replace GB19_marginW17 = 35.69251 if districtW17 == 10917
replace GB19_marginW17 = 40.85485 if districtW17 == 10918
replace GB19_marginW17 = 53.56785 if districtW17 == 10919
replace GB19_marginW17 = 10.21239 if districtW17 == 10920
replace GB19_marginW17 = 30.99495 if districtW17 == 10921
replace GB19_marginW17 = 1.251647 if districtW17 == 10922
replace GB19_marginW17 = 19.9555 if districtW17 == 10923
replace GB19_marginW17 = 30.70823 if districtW17 == 10924
replace GB19_marginW17 = 11.5584 if districtW17 == 10925
replace GB19_marginW17 = 18.99094 if districtW17 == 10926
replace GB19_marginW17 = 47.63007 if districtW17 == 10927
replace GB19_marginW17 = 40.34807 if districtW17 == 10928
replace GB19_marginW17 = 48.93019 if districtW17 == 10929
replace GB19_marginW17 = 26.72519 if districtW17 == 10930
replace GB19_marginW17 = 38.43777 if districtW17 == 10931
replace GB19_marginW17 = 29.60583 if districtW17 == 10932
replace GB19_marginW17 = 43.98084 if districtW17 == 10933
replace GB19_marginW17 = 4.338926 if districtW17 == 10934
replace GB19_marginW17 = 36.22075 if districtW17 == 10935
replace GB19_marginW17 = 33.59513 if districtW17 == 10936
replace GB19_marginW17 = 17.84577 if districtW17 == 10937
replace GB19_marginW17 = 39.08489 if districtW17 == 10938
replace GB19_marginW17 = 62.70563 if districtW17 == 10939
replace GB19_marginW17 = 41.76861 if districtW17 == 10940
replace GB19_marginW17 = 34.04872 if districtW17 == 10941
replace GB19_marginW17 = 41.4913 if districtW17 == 10942
replace GB19_marginW17 = 20.82218 if districtW17 == 10943
replace GB19_marginW17 = 25.30225 if districtW17 == 10944
replace GB19_marginW17 = 56.49435 if districtW17 == 10945
replace GB19_marginW17 = 42.80693 if districtW17 == 10946
replace GB19_marginW17 = 13.05521 if districtW17 == 10947
replace GB19_marginW17 = 21.93879 if districtW17 == 10948
replace GB19_marginW17 = 34.86034 if districtW17 == 10949
replace GB19_marginW17 = 40.1559 if districtW17 == 10950
replace GB19_marginW17 = 23.54595 if districtW17 == 10951
replace GB19_marginW17 = 50.89768 if districtW17 == 10952
replace GB19_marginW17 = 14.6122 if districtW17 == 10953
replace GB19_marginW17 = 39.4025 if districtW17 == 10954
replace GB19_marginW17 = 9.485248 if districtW17 == 10955
replace GB19_marginW17 = 13.80851 if districtW17 == 10956
replace GB19_marginW17 = 31.0699 if districtW17 == 10957
replace GB19_marginW17 = 8.607307 if districtW17 == 10958
replace GB19_marginW17 = 37.15007 if districtW17 == 10959
replace GB19_marginW17 = 10.92554 if districtW17 == 10960
replace GB19_marginW17 = 29.62923 if districtW17 == 10961
replace GB19_marginW17 = 25.67019 if districtW17 == 10962
replace GB19_marginW17 = 38.00608 if districtW17 == 10963
replace GB19_marginW17 = 8.324742 if districtW17 == 10964
replace GB19_marginW17 = 28.10808 if districtW17 == 10965
replace GB19_marginW17 = 37.63057 if districtW17 == 10966
replace GB19_marginW17 = 6.953362 if districtW17 == 10967
replace GB19_marginW17 = 17.95609 if districtW17 == 10968
replace GB19_marginW17 = 24.06568 if districtW17 == 10969
replace GB19_marginW17 = 2.495384 if districtW17 == 10970
replace GB19_marginW17 = 9.598192 if districtW17 == 10971
replace GB19_marginW17 = 2.089179 if districtW17 == 10972
replace GB19_marginW17 = 15.66253 if districtW17 == 10973
replace GB19_marginW17 = 28.45925 if districtW17 == 10974
replace GB19_marginW17 = 40.01565 if districtW17 == 10975
replace GB19_marginW17 = 29.70299 if districtW17 == 10976
replace GB19_marginW17 = 36.28107 if districtW17 == 10977
replace GB19_marginW17 = 31.30253 if districtW17 == 10978
replace GB19_marginW17 = 32.79006 if districtW17 == 10979
replace GB19_marginW17 = 5.82436 if districtW17 == 10980
replace GB19_marginW17 = 35.21473 if districtW17 == 10981
replace GB19_marginW17 = 6.817553 if districtW17 == 10982
replace GB19_marginW17 = 31.28346 if districtW17 == 10983
replace GB19_marginW17 = 16.54089 if districtW17 == 10984
replace GB19_marginW17 = 36.83134 if districtW17 == 10985
replace GB19_marginW17 = 42.63071 if districtW17 == 10986
replace GB19_marginW17 = 35.50759 if districtW17 == 10987
replace GB19_marginW17 = 18.35784 if districtW17 == 10988
replace GB19_marginW17 = 25.54816 if districtW17 == 10989
replace GB19_marginW17 = 36.65358 if districtW17 == 10990
replace GB19_marginW17 = 33.04237 if districtW17 == 10991
replace GB19_marginW17 = 38.30231 if districtW17 == 10992
replace GB19_marginW17 = 44.45112 if districtW17 == 10993
replace GB19_marginW17 = 23.6759 if districtW17 == 10994
replace GB19_marginW17 = 24.18944 if districtW17 == 10995
replace GB19_marginW17 = 40.66059 if districtW17 == 10996
replace GB19_marginW17 = 47.26242 if districtW17 == 10997
replace GB19_marginW17 = 24.4677 if districtW17 == 10998
replace GB19_marginW17 = 35.19811 if districtW17 == 10999
replace GB19_marginW17 = 41.84162 if districtW17 == 11000
replace GB19_marginW17 = 24.38388 if districtW17 == 11001
replace GB19_marginW17 = 64.39944 if districtW17 == 11002
replace GB19_marginW17 = 7.705694 if districtW17 == 11003
replace GB19_marginW17 = 26.7978 if districtW17 == 11004
replace GB19_marginW17 = 21.89201 if districtW17 == 11005
replace GB19_marginW17 = 8.667952 if districtW17 == 11006
replace GB19_marginW17 = 14.96254 if districtW17 == 11007
replace GB19_marginW17 = 34.81441 if districtW17 == 11008
replace GB19_marginW17 = 7.457748 if districtW17 == 11009
replace GB19_marginW17 = 39.40893 if districtW17 == 11010
replace GB19_marginW17 = 32.73061 if districtW17 == 11011
replace GB19_marginW17 = 8.137128 if districtW17 == 11012
replace GB19_marginW17 = 63.85021 if districtW17 == 11013
replace GB19_marginW17 = 2.00943 if districtW17 == 11014
replace GB19_marginW17 = 18.83644 if districtW17 == 11015
replace GB19_marginW17 = 30.91114 if districtW17 == 11016
replace GB19_marginW17 = 3.233546 if districtW17 == 11017
replace GB19_marginW17 = 3.247225 if districtW17 == 11018
replace GB19_marginW17 = 1.455587 if districtW17 == 11019
replace GB19_marginW17 = 9.924558 if districtW17 == 11020
replace GB19_marginW17 = 7.634547 if districtW17 == 11021
replace GB19_marginW17 = 35.20898 if districtW17 == 11022
replace GB19_marginW17 = 42.12159 if districtW17 == 11023
replace GB19_marginW17 = 1.108199 if districtW17 == 11024
replace GB19_marginW17 = 35.7136 if districtW17 == 11025
replace GB19_marginW17 = 16.21178 if districtW17 == 11026
replace GB19_marginW17 = 21.04585 if districtW17 == 11027
replace GB19_marginW17 = 5.209714 if districtW17 == 11028
replace GB19_marginW17 = 4.428074 if districtW17 == 11029
replace GB19_marginW17 = 11.0247 if districtW17 == 11030
replace GB19_marginW17 = 23.15306 if districtW17 == 11031
replace GB19_marginW17 = 53.80067 if districtW17 == 11032
replace GB19_marginW17 = 15.82895 if districtW17 == 11033
replace GB19_marginW17 = 45.09206 if districtW17 == 11034
replace GB19_marginW17 = 42.58474 if districtW17 == 11035
replace GB19_marginW17 = 25.07283 if districtW17 == 11036
replace GB19_marginW17 = 3.668994 if districtW17 == 11037
replace GB19_marginW17 = 30.78541 if districtW17 == 11038
replace GB19_marginW17 = 14.93717 if districtW17 == 11039
replace GB19_marginW17 = 1.184303 if districtW17 == 11040
replace GB19_marginW17 = 1.672611 if districtW17 == 11041
replace GB19_marginW17 = 37.35628 if districtW17 == 11042
replace GB19_marginW17 = 14.01934 if districtW17 == 11043
replace GB19_marginW17 = 6.997066 if districtW17 == 11044
replace GB19_marginW17 = 48.80432 if districtW17 == 11045
replace GB19_marginW17 = 24.75654 if districtW17 == 11046
replace GB19_marginW17 = 18.10816 if districtW17 == 11047
replace GB19_marginW17 = 11.90864 if districtW17 == 11048
replace GB19_marginW17 = 11.90164 if districtW17 == 11049
replace GB19_marginW17 = 3.692851 if districtW17 == 11050
replace GB19_marginW17 = 4.037827 if districtW17 == 11051
replace GB19_marginW17 = 13.27753 if districtW17 == 11052
replace GB19_marginW17 = 10.0387 if districtW17 == 11053
replace GB19_marginW17 = 7.200214 if districtW17 == 11054
replace GB19_marginW17 = 27.12451 if districtW17 == 11055
replace GB19_marginW17 = 7.695961 if districtW17 == 11056
replace GB19_marginW17 = 31.70773 if districtW17 == 11057
replace GB19_marginW17 = 42.35083 if districtW17 == 11058
replace GB19_marginW17 = 23.22661 if districtW17 == 11059
replace GB19_marginW17 = 27.3051 if districtW17 == 11060
replace GB19_marginW17 = 27.36087 if districtW17 == 11061
replace GB19_marginW17 = 18.04073 if districtW17 == 11062
replace GB19_marginW17 = 4.285544 if districtW17 == 40001
replace GB19_marginW17 = 3.962314 if districtW17 == 40002
replace GB19_marginW17 = 32.5245 if districtW17 == 40003
replace GB19_marginW17 = 37.83199 if districtW17 == 40004
replace GB19_marginW17 = 17.99737 if districtW17 == 40005
replace GB19_marginW17 = 24.44405 if districtW17 == 40006
replace GB19_marginW17 = .1122892 if districtW17 == 40007
replace GB19_marginW17 = 36.29306 if districtW17 == 40008
replace GB19_marginW17 = 14.3134 if districtW17 == 40009
replace GB19_marginW17 = 21.37382 if districtW17 == 40010
replace GB19_marginW17 = 18.28905 if districtW17 == 40011
replace GB19_marginW17 = 28.87789 if districtW17 == 40012
replace GB19_marginW17 = 7.302609 if districtW17 == 40013
replace GB19_marginW17 = 6.257275 if districtW17 == 40014
replace GB19_marginW17 = 3.255498 if districtW17 == 40015
replace GB19_marginW17 = 18.86354 if districtW17 == 40016
replace GB19_marginW17 = 16.40524 if districtW17 == 40017
replace GB19_marginW17 = 18.15665 if districtW17 == 40018
replace GB19_marginW17 = 33.86524 if districtW17 == 20001
replace GB19_marginW17 = 8.742717 if districtW17 == 20002
replace GB19_marginW17 = 13.07704 if districtW17 == 20003
replace GB19_marginW17 = 8.790827 if districtW17 == 20004
replace GB19_marginW17 = 8.553589 if districtW17 == 20005
replace GB19_marginW17 = 4.998711 if districtW17 == 20006
replace GB19_marginW17 = 9.744438 if districtW17 == 20007
replace GB19_marginW17 = 9.686523 if districtW17 == 20008
replace GB19_marginW17 = .6485015 if districtW17 == 20009
replace GB19_marginW17 = 11.39812 if districtW17 == 20010
replace GB19_marginW17 = 11.66297 if districtW17 == 20011
replace GB19_marginW17 = 28.40257 if districtW17 == 20012
replace GB19_marginW17 = 3.509691 if districtW17 == 20013
replace GB19_marginW17 = 7.692307 if districtW17 == 20014
replace GB19_marginW17 = 29.54039 if districtW17 == 20015
replace GB19_marginW17 = 29.48363 if districtW17 == 20016
replace GB19_marginW17 = 20.00486 if districtW17 == 20017
replace GB19_marginW17 = .2809674 if districtW17 == 20018
replace GB19_marginW17 = 23.64698 if districtW17 == 20019
replace GB19_marginW17 = 6.64126 if districtW17 == 20020
replace GB19_marginW17 = 9.801832 if districtW17 == 20021
replace GB19_marginW17 = 21.78605 if districtW17 == 20022
replace GB19_marginW17 = 21.58264 if districtW17 == 20023
replace GB19_marginW17 = 22.30958 if districtW17 == 20024
replace GB19_marginW17 = 22.98441 if districtW17 == 20025
replace GB19_marginW17 = 6.911409 if districtW17 == 20026
replace GB19_marginW17 = 16.84051 if districtW17 == 20027
replace GB19_marginW17 = 26.75401 if districtW17 == 20028
replace GB19_marginW17 = 16.14262 if districtW17 == 20029
replace GB19_marginW17 = 14.46353 if districtW17 == 20030
replace GB19_marginW17 = 15.47622 if districtW17 == 20031
replace GB19_marginW17 = 7.510686 if districtW17 == 20032
replace GB19_marginW17 = 21.03687 if districtW17 == 20033
replace GB19_marginW17 = 18.98067 if districtW17 == 20034
replace GB19_marginW17 = 13.29823 if districtW17 == 20035
replace GB19_marginW17 = 28.29875 if districtW17 == 20036
replace GB19_marginW17 = 1.464698 if districtW17 == 20037
replace GB19_marginW17 = 18.82565 if districtW17 == 20038
replace GB19_marginW17 = 19.04762 if districtW17 == 20039
replace GB19_marginW17 = 26.57723 if districtW17 == 20040
replace GB19_marginW17 = 2.644399 if districtW17 == 20041
replace GB19_marginW17 = 9.773514 if districtW17 == 20042
replace GB19_marginW17 = 19.49978 if districtW17 == 20043
replace GB19_marginW17 = 24.60983 if districtW17 == 20044
replace GB19_marginW17 = 11.83094 if districtW17 == 20045
replace GB19_marginW17 = 1.05069 if districtW17 == 20046
replace GB19_marginW17 = 14.11076 if districtW17 == 20047
replace GB19_marginW17 = 17.69531 if districtW17 == 20048
replace GB19_marginW17 = 2.868479 if districtW17 == 20049
replace GB19_marginW17 = 7.780257 if districtW17 == 20050
replace GB19_marginW17 = 10.8247 if districtW17 == 20051
replace GB19_marginW17 = 23.95636 if districtW17 == 20052
replace GB19_marginW17 = 24.78647 if districtW17 == 20053
replace GB19_marginW17 = 13.96183 if districtW17 == 20054
replace GB19_marginW17 = 23.68507 if districtW17 == 20055
replace GB19_marginW17 = 9.722275 if districtW17 == 20056
replace GB19_marginW17 = 17.58647 if districtW17 == 20057
replace GB19_marginW17 = 1.58028 if districtW17 == 20058
replace GB19_marginW17 = 21.16305 if districtW17 == 20059
replace GB19_marginW17 = 5.384109 if districtW17 == 30041
replace GB19_marginW17 = 2.254367 if districtW17 == 30042
replace GB19_marginW17 = .495255 if districtW17 == 30043
replace GB19_marginW17 = 6.355124 if districtW17 == 30044
replace GB19_marginW17 = 12.21458 if districtW17 == 30045
replace GB19_marginW17 = 4.129758 if districtW17 == 30046
replace GB19_marginW17 = 22.65141 if districtW17 == 30047
replace GB19_marginW17 = 23.73507 if districtW17 == 30048
replace GB19_marginW17 = 33.1983 if districtW17 == 30049
replace GB19_marginW17 = 41.07647 if districtW17 == 30050
replace GB19_marginW17 = 13.25713 if districtW17 == 30051
replace GB19_marginW17 = 38.59388 if districtW17 == 30052
replace GB19_marginW17 = 10.06563 if districtW17 == 30053
replace GB19_marginW17 = 19.87773 if districtW17 == 30054
replace GB19_marginW17 = 5.490327 if districtW17 == 30055
replace GB19_marginW17 = 2.07676 if districtW17 == 30056
replace GB19_marginW17 = 9.565247 if districtW17 == 30057
replace GB19_marginW17 = 6.383181 if districtW17 == 30058
replace GB19_marginW17 = 16.78233 if districtW17 == 30059
replace GB19_marginW17 = 4.909575 if districtW17 == 30060
replace GB19_marginW17 = 15.83801 if districtW17 == 30061
replace GB19_marginW17 = 3.412658 if districtW17 == 30062
replace GB19_marginW17 = 35.4767 if districtW17 == 30063
replace GB19_marginW17 = 15.78108 if districtW17 == 30064
replace GB19_marginW17 = 11.93333 if districtW17 == 30065
replace GB19_marginW17 = 18.39056 if districtW17 == 30066
replace GB19_marginW17 = 4.411981 if districtW17 == 30067
replace GB19_marginW17 = 17.2584 if districtW17 == 30068
replace GB19_marginW17 = 15.33627 if districtW17 == 30069
replace GB19_marginW17 = 29.17714 if districtW17 == 30070
replace GB19_marginW17 = 32.8909 if districtW17 == 30071
replace GB19_marginW17 = 28.61445 if districtW17 == 30072
replace GB19_marginW17 = 2.73937 if districtW17 == 30073
replace GB19_marginW17 = 22.05425 if districtW17 == 30074
replace GB19_marginW17 = 15.07168 if districtW17 == 30075
replace GB19_marginW17 = 17.03268 if districtW17 == 30076
replace GB19_marginW17 = 15.90684 if districtW17 == 30077
replace GB19_marginW17 = 6.499168 if districtW17 == 30078
replace GB19_marginW17 = 23.79107 if districtW17 == 30079
replace GB19_marginW17 = 25.18239 if districtW17 == 30080

gen GB19_marginW18 = .

replace GB19_marginW18 = 34.83685 if districtW18 == 10530
replace GB19_marginW18 = 50.4194 if districtW18 == 10531
replace GB19_marginW18 = 11.21012 if districtW18 == 10532
replace GB19_marginW18 = 37.05752 if districtW18 == 10533
replace GB19_marginW18 = 36.67437 if districtW18 == 10534
replace GB19_marginW18 = 11.70478 if districtW18 == 10535
replace GB19_marginW18 = 40.009 if districtW18 == 10536
replace GB19_marginW18 = 11.05005 if districtW18 == 10537
replace GB19_marginW18 = 28.67968 if districtW18 == 10538
replace GB19_marginW18 = 26.72081 if districtW18 == 10539
replace GB19_marginW18 = 34.6682 if districtW18 == 10540
replace GB19_marginW18 = 9.676719 if districtW18 == 10541
replace GB19_marginW18 = 8.450222 if districtW18 == 10542
replace GB19_marginW18 = 12.57221 if districtW18 == 10543
replace GB19_marginW18 = 46.25635 if districtW18 == 10544
replace GB19_marginW18 = 25.94995 if districtW18 == 10545
replace GB19_marginW18 = 27.5624 if districtW18 == 10546
replace GB19_marginW18 = 23.63343 if districtW18 == 10547
replace GB19_marginW18 = 6.660116 if districtW18 == 10548
replace GB19_marginW18 = 9.45029 if districtW18 == 10549
replace GB19_marginW18 = 27.15145 if districtW18 == 10550
replace GB19_marginW18 = 28.20295 if districtW18 == 10551
replace GB19_marginW18 = .3065497 if districtW18 == 10552
replace GB19_marginW18 = 27.51173 if districtW18 == 10553
replace GB19_marginW18 = 35.23 if districtW18 == 10554
replace GB19_marginW18 = 61.95965 if districtW18 == 10555
replace GB19_marginW18 = 38.19058 if districtW18 == 10556
replace GB19_marginW18 = 44.09829 if districtW18 == 10557
replace GB19_marginW18 = 30.29876 if districtW18 == 10558
replace GB19_marginW18 = 41.82711 if districtW18 == 10559
replace GB19_marginW18 = 13.26309 if districtW18 == 10560
replace GB19_marginW18 = 10.2217 if districtW18 == 10561
replace GB19_marginW18 = 53.87915 if districtW18 == 10562
replace GB19_marginW18 = 63.67353 if districtW18 == 10563
replace GB19_marginW18 = 67.86172 if districtW18 == 10564
replace GB19_marginW18 = 3.805283 if districtW18 == 10565
replace GB19_marginW18 = 36.34185 if districtW18 == 10566
replace GB19_marginW18 = 25.09552 if districtW18 == 10567
replace GB19_marginW18 = 24.9754 if districtW18 == 10568
replace GB19_marginW18 = 17.77033 if districtW18 == 10569
replace GB19_marginW18 = 40.91559 if districtW18 == 10570
replace GB19_marginW18 = 37.29349 if districtW18 == 10571
replace GB19_marginW18 = 22.15236 if districtW18 == 10572
replace GB19_marginW18 = 11.26649 if districtW18 == 10573
replace GB19_marginW18 = 12.10788 if districtW18 == 10574
replace GB19_marginW18 = 1.742578 if districtW18 == 10575
replace GB19_marginW18 = 43.93143 if districtW18 == 10576
replace GB19_marginW18 = 11.53511 if districtW18 == 10577
replace GB19_marginW18 = .8678496 if districtW18 == 10578
replace GB19_marginW18 = 18.71244 if districtW18 == 10579
replace GB19_marginW18 = 17.96219 if districtW18 == 10580
replace GB19_marginW18 = 70.2729 if districtW18 == 10581
replace GB19_marginW18 = 61.44714 if districtW18 == 10582
replace GB19_marginW18 = 46.56578 if districtW18 == 10583
replace GB19_marginW18 = 17.87149 if districtW18 == 10584
replace GB19_marginW18 = 22.07625 if districtW18 == 10585
replace GB19_marginW18 = 36.4839 if districtW18 == 10586
replace GB19_marginW18 = 41.06464 if districtW18 == 10587
replace GB19_marginW18 = 5.903223 if districtW18 == 10588
replace GB19_marginW18 = 61.04471 if districtW18 == 10589
replace GB19_marginW18 = 48.85839 if districtW18 == 10590
replace GB19_marginW18 = 42.47741 if districtW18 == 10591
replace GB19_marginW18 = 15.57278 if districtW18 == 10592
replace GB19_marginW18 = 18.02626 if districtW18 == 10593
replace GB19_marginW18 = 54.89244 if districtW18 == 10594
replace GB19_marginW18 = 42.39055 if districtW18 == 10595
replace GB19_marginW18 = 50.55297 if districtW18 == 10596
replace GB19_marginW18 = 16.60932 if districtW18 == 10597
replace GB19_marginW18 = 34.3805 if districtW18 == 10598
replace GB19_marginW18 = 20.6964 if districtW18 == 10599
replace GB19_marginW18 = 10.1852 if districtW18 == 10600
replace GB19_marginW18 = 17.8618 if districtW18 == 10601
replace GB19_marginW18 = 37.3623 if districtW18 == 10602
replace GB19_marginW18 = 38.36811 if districtW18 == 10603
replace GB19_marginW18 = 23.90159 if districtW18 == 10604
replace GB19_marginW18 = 42.57444 if districtW18 == 10605
replace GB19_marginW18 = 42.40783 if districtW18 == 10606
replace GB19_marginW18 = 9.645027 if districtW18 == 10607
replace GB19_marginW18 = 32.16458 if districtW18 == 10608
replace GB19_marginW18 = 3.46809 if districtW18 == 10609
replace GB19_marginW18 = 29.74271 if districtW18 == 10610
replace GB19_marginW18 = .2241611 if districtW18 == 10611
replace GB19_marginW18 = .7996172 if districtW18 == 10612
replace GB19_marginW18 = 40.3312 if districtW18 == 10613
replace GB19_marginW18 = 9.990832 if districtW18 == 10614
replace GB19_marginW18 = 59.79608 if districtW18 == 10615
replace GB19_marginW18 = 17.27322 if districtW18 == 10616
replace GB19_marginW18 = 17.94003 if districtW18 == 10617
replace GB19_marginW18 = 42.92316 if districtW18 == 10618
replace GB19_marginW18 = 3.054246 if districtW18 == 10619
replace GB19_marginW18 = 19.40382 if districtW18 == 10620
replace GB19_marginW18 = 1.281112 if districtW18 == 10621
replace GB19_marginW18 = 60.15313 if districtW18 == 10622
replace GB19_marginW18 = 30.51557 if districtW18 == 10623
replace GB19_marginW18 = 41.584 if districtW18 == 10624
replace GB19_marginW18 = 40.45335 if districtW18 == 10625
replace GB19_marginW18 = 42.77803 if districtW18 == 10626
replace GB19_marginW18 = 4.178667 if districtW18 == 10627
replace GB19_marginW18 = 30.84801 if districtW18 == 10628
replace GB19_marginW18 = 24.00846 if districtW18 == 10629
replace GB19_marginW18 = 1.652712 if districtW18 == 10630
replace GB19_marginW18 = 29.13352 if districtW18 == 10631
replace GB19_marginW18 = 3.21117 if districtW18 == 10632
replace GB19_marginW18 = 35.08972 if districtW18 == 10633
replace GB19_marginW18 = 2.605069 if districtW18 == 10634
replace GB19_marginW18 = 19.76917 if districtW18 == 10635
replace GB19_marginW18 = 2.105299 if districtW18 == 10636
replace GB19_marginW18 = 43.62177 if districtW18 == 10637
replace GB19_marginW18 = 47.38504 if districtW18 == 10638
replace GB19_marginW18 = 9.252628 if districtW18 == 10639
replace GB19_marginW18 = 11.29766 if districtW18 == 10640
replace GB19_marginW18 = 10.28469 if districtW18 == 10641
replace GB19_marginW18 = 56.77838 if districtW18 == 10642
replace GB19_marginW18 = 46.22025 if districtW18 == 10643
replace GB19_marginW18 = 17.65499 if districtW18 == 10644
replace GB19_marginW18 = 8.38041 if districtW18 == 10645
replace GB19_marginW18 = 32.43059 if districtW18 == 10646
replace GB19_marginW18 = 13.73845 if districtW18 == 10647
replace GB19_marginW18 = 16.97892 if districtW18 == 10648
replace GB19_marginW18 = 17.30717 if districtW18 == 10649
replace GB19_marginW18 = .4356563 if districtW18 == 10650
replace GB19_marginW18 = .8902401 if districtW18 == 10651
replace GB19_marginW18 = 16.75384 if districtW18 == 10652
replace GB19_marginW18 = 15.74623 if districtW18 == 10653
replace GB19_marginW18 = 11.0075 if districtW18 == 10654
replace GB19_marginW18 = 44.36872 if districtW18 == 10655
replace GB19_marginW18 = 20.78743 if districtW18 == 10656
replace GB19_marginW18 = .6699443 if districtW18 == 10657
replace GB19_marginW18 = 7.572761 if districtW18 == 10658
replace GB19_marginW18 = 35.46637 if districtW18 == 10659
replace GB19_marginW18 = 45.43316 if districtW18 == 10660
replace GB19_marginW18 = 16.00238 if districtW18 == 10661
replace GB19_marginW18 = 5.4023 if districtW18 == 10662
replace GB19_marginW18 = 14.17503 if districtW18 == 10663
replace GB19_marginW18 = 34.75088 if districtW18 == 10664
replace GB19_marginW18 = 47.08757 if districtW18 == 10665
replace GB19_marginW18 = 2.768269 if districtW18 == 10666
replace GB19_marginW18 = 7.989082 if districtW18 == 10667
replace GB19_marginW18 = 5.478466 if districtW18 == 10668
replace GB19_marginW18 = 5.823383 if districtW18 == 10669
replace GB19_marginW18 = 24.21648 if districtW18 == 10670
replace GB19_marginW18 = 31.43878 if districtW18 == 10671
replace GB19_marginW18 = 42.55523 if districtW18 == 10672
replace GB19_marginW18 = 48.96196 if districtW18 == 10673
replace GB19_marginW18 = 24.26697 if districtW18 == 10674
replace GB19_marginW18 = 24.72044 if districtW18 == 10675
replace GB19_marginW18 = 38.0984 if districtW18 == 10676
replace GB19_marginW18 = 19.02958 if districtW18 == 10677
replace GB19_marginW18 = 10.46931 if districtW18 == 10678
replace GB19_marginW18 = 60.73076 if districtW18 == 10679
replace GB19_marginW18 = 34.61815 if districtW18 == 10680
replace GB19_marginW18 = 40.27475 if districtW18 == 10681
replace GB19_marginW18 = 14.06791 if districtW18 == 10682
replace GB19_marginW18 = 43.18255 if districtW18 == 10683
replace GB19_marginW18 = 7.855406 if districtW18 == 10684
replace GB19_marginW18 = 26.46555 if districtW18 == 10685
replace GB19_marginW18 = 34.81716 if districtW18 == 10686
replace GB19_marginW18 = 39.69907 if districtW18 == 10687
replace GB19_marginW18 = 17.97891 if districtW18 == 10688
replace GB19_marginW18 = 29.80335 if districtW18 == 10689
replace GB19_marginW18 = 7.317633 if districtW18 == 10690
replace GB19_marginW18 = 14.41066 if districtW18 == 10691
replace GB19_marginW18 = 9.41281 if districtW18 == 10692
replace GB19_marginW18 = 44.10957 if districtW18 == 10693
replace GB19_marginW18 = 30.06342 if districtW18 == 10694
replace GB19_marginW18 = 21.72738 if districtW18 == 10695
replace GB19_marginW18 = 9.080803 if districtW18 == 10696
replace GB19_marginW18 = 4.348171 if districtW18 == 10697
replace GB19_marginW18 = 18.51331 if districtW18 == 10698
replace GB19_marginW18 = 45.56507 if districtW18 == 10699
replace GB19_marginW18 = 43.60837 if districtW18 == 10700
replace GB19_marginW18 = 16.43764 if districtW18 == 10701
replace GB19_marginW18 = 10.5038 if districtW18 == 10702
replace GB19_marginW18 = 11.90731 if districtW18 == 10703
replace GB19_marginW18 = 36.16134 if districtW18 == 10704
replace GB19_marginW18 = 30.82856 if districtW18 == 10705
replace GB19_marginW18 = 35.60085 if districtW18 == 10706
replace GB19_marginW18 = 44.99275 if districtW18 == 10707
replace GB19_marginW18 = 59.30315 if districtW18 == 10708
replace GB19_marginW18 = 18.87534 if districtW18 == 10709
replace GB19_marginW18 = 1.359278 if districtW18 == 10710
replace GB19_marginW18 = 32.89743 if districtW18 == 10711
replace GB19_marginW18 = 19.11502 if districtW18 == 10712
replace GB19_marginW18 = 48.04243 if districtW18 == 10713
replace GB19_marginW18 = 46.43144 if districtW18 == 10714
replace GB19_marginW18 = 32.76072 if districtW18 == 10715
replace GB19_marginW18 = 22.15674 if districtW18 == 10716
replace GB19_marginW18 = 40.6401 if districtW18 == 10717
replace GB19_marginW18 = 34.75904 if districtW18 == 10718
replace GB19_marginW18 = 5.689588 if districtW18 == 10719
replace GB19_marginW18 = 58.36382 if districtW18 == 10720
replace GB19_marginW18 = 62.42767 if districtW18 == 10721
replace GB19_marginW18 = 28.5134 if districtW18 == 10722
replace GB19_marginW18 = 5.529726 if districtW18 == 10723
replace GB19_marginW18 = 40.83851 if districtW18 == 10724
replace GB19_marginW18 = 41.06876 if districtW18 == 10725
replace GB19_marginW18 = 34.34361 if districtW18 == 10726
replace GB19_marginW18 = 24.72423 if districtW18 == 10727
replace GB19_marginW18 = 30.14358 if districtW18 == 10728
replace GB19_marginW18 = 32.43761 if districtW18 == 10729
replace GB19_marginW18 = 16.99246 if districtW18 == 10730
replace GB19_marginW18 = 16.50805 if districtW18 == 10731
replace GB19_marginW18 = 18.13781 if districtW18 == 10732
replace GB19_marginW18 = 8.760386 if districtW18 == 10733
replace GB19_marginW18 = 38.83917 if districtW18 == 10734
replace GB19_marginW18 = 7.44924 if districtW18 == 10735
replace GB19_marginW18 = 47.41618 if districtW18 == 10736
replace GB19_marginW18 = 21.0506 if districtW18 == 10737
replace GB19_marginW18 = 9.99119 if districtW18 == 10738
replace GB19_marginW18 = 28.40397 if districtW18 == 10739
replace GB19_marginW18 = 2.687496 if districtW18 == 10740
replace GB19_marginW18 = 7.680437 if districtW18 == 10741
replace GB19_marginW18 = 23.91634 if districtW18 == 10742
replace GB19_marginW18 = 39.65274 if districtW18 == 10743
replace GB19_marginW18 = 32.64885 if districtW18 == 10744
replace GB19_marginW18 = 40.82715 if districtW18 == 10745
replace GB19_marginW18 = 22.85807 if districtW18 == 10746
replace GB19_marginW18 = 1.39614 if districtW18 == 10747
replace GB19_marginW18 = 1.089105 if districtW18 == 10748
replace GB19_marginW18 = 11.71205 if districtW18 == 10749
replace GB19_marginW18 = 48.89057 if districtW18 == 10750
replace GB19_marginW18 = 43.18375 if districtW18 == 10751
replace GB19_marginW18 = 31.49006 if districtW18 == 10752
replace GB19_marginW18 = 33.4066 if districtW18 == 10753
replace GB19_marginW18 = 7.824471 if districtW18 == 10754
replace GB19_marginW18 = 30.22468 if districtW18 == 10755
replace GB19_marginW18 = 11.78788 if districtW18 == 10756
replace GB19_marginW18 = 32.77089 if districtW18 == 10757
replace GB19_marginW18 = 6.95892 if districtW18 == 10758
replace GB19_marginW18 = 10.41226 if districtW18 == 10759
replace GB19_marginW18 = 45.06797 if districtW18 == 10760
replace GB19_marginW18 = 11.05105 if districtW18 == 10761
replace GB19_marginW18 = 31.88657 if districtW18 == 10762
replace GB19_marginW18 = 48.67206 if districtW18 == 10763
replace GB19_marginW18 = 36.23891 if districtW18 == 10764
replace GB19_marginW18 = 17.4784 if districtW18 == 10765
replace GB19_marginW18 = 4.216731 if districtW18 == 10766
replace GB19_marginW18 = 38.69613 if districtW18 == 10767
replace GB19_marginW18 = .3427625 if districtW18 == 10768
replace GB19_marginW18 = 33.96407 if districtW18 == 10769
replace GB19_marginW18 = 17.2386 if districtW18 == 10770
replace GB19_marginW18 = 3.819123 if districtW18 == 10771
replace GB19_marginW18 = 22.19981 if districtW18 == 10772
replace GB19_marginW18 = 9.108305 if districtW18 == 10773
replace GB19_marginW18 = 22.75216 if districtW18 == 10774
replace GB19_marginW18 = 72.70377 if districtW18 == 10775
replace GB19_marginW18 = 5.263275 if districtW18 == 10776
replace GB19_marginW18 = 39.09991 if districtW18 == 10777
replace GB19_marginW18 = 14.16317 if districtW18 == 10778
replace GB19_marginW18 = 33.8396 if districtW18 == 10779
replace GB19_marginW18 = 21.81077 if districtW18 == 10780
replace GB19_marginW18 = 26.22576 if districtW18 == 10781
replace GB19_marginW18 = 12.17904 if districtW18 == 10782
replace GB19_marginW18 = 45.21706 if districtW18 == 10783
replace GB19_marginW18 = 12.11215 if districtW18 == 10784
replace GB19_marginW18 = 4.18272 if districtW18 == 10785
replace GB19_marginW18 = 4.479405 if districtW18 == 10786
replace GB19_marginW18 = 37.95158 if districtW18 == 10787
replace GB19_marginW18 = 41.34933 if districtW18 == 10788
replace GB19_marginW18 = 59.44408 if districtW18 == 10789
replace GB19_marginW18 = 46.71022 if districtW18 == 10790
replace GB19_marginW18 = 43.77975 if districtW18 == 10791
replace GB19_marginW18 = 6.940687 if districtW18 == 10792
replace GB19_marginW18 = 70.17181 if districtW18 == 10793
replace GB19_marginW18 = 74.8296 if districtW18 == 10794
replace GB19_marginW18 = 62.44093 if districtW18 == 10795
replace GB19_marginW18 = 68.1625 if districtW18 == 10796
replace GB19_marginW18 = 13.12259 if districtW18 == 10797
replace GB19_marginW18 = 55.16319 if districtW18 == 10798
replace GB19_marginW18 = 47.08412 if districtW18 == 10799
replace GB19_marginW18 = 21.71218 if districtW18 == 10800
replace GB19_marginW18 = 20.8159 if districtW18 == 10801
replace GB19_marginW18 = 19.88416 if districtW18 == 10802
replace GB19_marginW18 = 33.36048 if districtW18 == 10803
replace GB19_marginW18 = 42.12849 if districtW18 == 10804
replace GB19_marginW18 = 10.70969 if districtW18 == 10805
replace GB19_marginW18 = 59.5957 if districtW18 == 10806
replace GB19_marginW18 = 55.6312 if districtW18 == 10807
replace GB19_marginW18 = 68.10866 if districtW18 == 10808
replace GB19_marginW18 = 52.65591 if districtW18 == 10809
replace GB19_marginW18 = 33.09317 if districtW18 == 10810
replace GB19_marginW18 = 42.96084 if districtW18 == 10811
replace GB19_marginW18 = 42.16318 if districtW18 == 10812
replace GB19_marginW18 = 38.11055 if districtW18 == 10813
replace GB19_marginW18 = 31.17149 if districtW18 == 10814
replace GB19_marginW18 = 30.44758 if districtW18 == 10815
replace GB19_marginW18 = 40.21286 if districtW18 == 10816
replace GB19_marginW18 = 28.99366 if districtW18 == 10817
replace GB19_marginW18 = 49.92249 if districtW18 == 10818
replace GB19_marginW18 = 24.62094 if districtW18 == 10819
replace GB19_marginW18 = 24.31353 if districtW18 == 10820
replace GB19_marginW18 = 10.00112 if districtW18 == 10821
replace GB19_marginW18 = 10.84881 if districtW18 == 10822
replace GB19_marginW18 = 36.03332 if districtW18 == 10823
replace GB19_marginW18 = 21.08387 if districtW18 == 10824
replace GB19_marginW18 = 14.0234 if districtW18 == 10825
replace GB19_marginW18 = 21.69652 if districtW18 == 10826
replace GB19_marginW18 = 49.72039 if districtW18 == 10827
replace GB19_marginW18 = 48.50912 if districtW18 == 10828
replace GB19_marginW18 = 39.83784 if districtW18 == 10829
replace GB19_marginW18 = 26.74589 if districtW18 == 10830
replace GB19_marginW18 = 32.76405 if districtW18 == 10831
replace GB19_marginW18 = 35.65779 if districtW18 == 10832
replace GB19_marginW18 = 12.26622 if districtW18 == 10833
replace GB19_marginW18 = 16.6432 if districtW18 == 10834
replace GB19_marginW18 = 33.29972 if districtW18 == 10835
replace GB19_marginW18 = 2.644068 if districtW18 == 10836
replace GB19_marginW18 = 28.54599 if districtW18 == 10837
replace GB19_marginW18 = 26.6512 if districtW18 == 10838
replace GB19_marginW18 = 43.31189 if districtW18 == 10839
replace GB19_marginW18 = 11.2383 if districtW18 == 10840
replace GB19_marginW18 = 37.34812 if districtW18 == 10841
replace GB19_marginW18 = 56.62903 if districtW18 == 10842
replace GB19_marginW18 = 26.16169 if districtW18 == 10843
replace GB19_marginW18 = 34.09988 if districtW18 == 10844
replace GB19_marginW18 = 32.87545 if districtW18 == 10845
replace GB19_marginW18 = 26.15792 if districtW18 == 10846
replace GB19_marginW18 = 48.70574 if districtW18 == 10847
replace GB19_marginW18 = 28.32379 if districtW18 == 10848
replace GB19_marginW18 = 40.60836 if districtW18 == 10849
replace GB19_marginW18 = 28.2588 if districtW18 == 10850
replace GB19_marginW18 = 29.34047 if districtW18 == 10851
replace GB19_marginW18 = 35.67811 if districtW18 == 10852
replace GB19_marginW18 = 18.95933 if districtW18 == 10853
replace GB19_marginW18 = 39.1079 if districtW18 == 10854
replace GB19_marginW18 = 40.26312 if districtW18 == 10855
replace GB19_marginW18 = 2.400187 if districtW18 == 10856
replace GB19_marginW18 = 44.65189 if districtW18 == 10857
replace GB19_marginW18 = 37.90342 if districtW18 == 10858
replace GB19_marginW18 = 42.74924 if districtW18 == 10859
replace GB19_marginW18 = 32.18891 if districtW18 == 10860
replace GB19_marginW18 = 13.92802 if districtW18 == 10861
replace GB19_marginW18 = 11.50239 if districtW18 == 10862
replace GB19_marginW18 = 10.23658 if districtW18 == 10863
replace GB19_marginW18 = 24.69375 if districtW18 == 10864
replace GB19_marginW18 = 43.47815 if districtW18 == 10865
replace GB19_marginW18 = 12.71234 if districtW18 == 10866
replace GB19_marginW18 = 26.11044 if districtW18 == 10867
replace GB19_marginW18 = 29.08608 if districtW18 == 10868
replace GB19_marginW18 = 41.07054 if districtW18 == 10869
replace GB19_marginW18 = 3.247121 if districtW18 == 10870
replace GB19_marginW18 = 25.04164 if districtW18 == 10871
replace GB19_marginW18 = 45.93091 if districtW18 == 10872
replace GB19_marginW18 = 36.12715 if districtW18 == 10873
replace GB19_marginW18 = 15.20298 if districtW18 == 10874
replace GB19_marginW18 = 13.91363 if districtW18 == 10875
replace GB19_marginW18 = 14.55978 if districtW18 == 10876
replace GB19_marginW18 = 38.72324 if districtW18 == 10877
replace GB19_marginW18 = 5.397377 if districtW18 == 10878
replace GB19_marginW18 = 29.15301 if districtW18 == 10879
replace GB19_marginW18 = 8.945766 if districtW18 == 10880
replace GB19_marginW18 = 37.89023 if districtW18 == 10881
replace GB19_marginW18 = 47.17018 if districtW18 == 10882
replace GB19_marginW18 = 34.3716 if districtW18 == 10883
replace GB19_marginW18 = 11.30838 if districtW18 == 10884
replace GB19_marginW18 = 35.94555 if districtW18 == 10885
replace GB19_marginW18 = 6.487134 if districtW18 == 10886
replace GB19_marginW18 = 9.459647 if districtW18 == 10887
replace GB19_marginW18 = 56.46527 if districtW18 == 10888
replace GB19_marginW18 = 10.59408 if districtW18 == 10889
replace GB19_marginW18 = 8.169949 if districtW18 == 10890
replace GB19_marginW18 = 8.635717 if districtW18 == 10891
replace GB19_marginW18 = 36.39005 if districtW18 == 10892
replace GB19_marginW18 = 34.44579 if districtW18 == 10893
replace GB19_marginW18 = 33.35323 if districtW18 == 10894
replace GB19_marginW18 = 47.15526 if districtW18 == 10895
replace GB19_marginW18 = 11.93539 if districtW18 == 10896
replace GB19_marginW18 = 20.37642 if districtW18 == 10897
replace GB19_marginW18 = 32.87756 if districtW18 == 10898
replace GB19_marginW18 = 26.62997 if districtW18 == 10899
replace GB19_marginW18 = 37.88402 if districtW18 == 10900
replace GB19_marginW18 = 21.15587 if districtW18 == 10901
replace GB19_marginW18 = 19.5035 if districtW18 == 10902
replace GB19_marginW18 = 12.97384 if districtW18 == 10903
replace GB19_marginW18 = 8.754313 if districtW18 == 10904
replace GB19_marginW18 = 26.46318 if districtW18 == 10905
replace GB19_marginW18 = 30.9882 if districtW18 == 10906
replace GB19_marginW18 = 34.28475 if districtW18 == 10907
replace GB19_marginW18 = 12.63202 if districtW18 == 10908
replace GB19_marginW18 = 46.1739 if districtW18 == 10909
replace GB19_marginW18 = 43.74029 if districtW18 == 10910
replace GB19_marginW18 = 32.24641 if districtW18 == 10911
replace GB19_marginW18 = 36.73181 if districtW18 == 10912
replace GB19_marginW18 = 20.65401 if districtW18 == 10913
replace GB19_marginW18 = 17.08874 if districtW18 == 10914
replace GB19_marginW18 = 10.85743 if districtW18 == 10915
replace GB19_marginW18 = 29.72091 if districtW18 == 10916
replace GB19_marginW18 = 35.69251 if districtW18 == 10917
replace GB19_marginW18 = 40.85485 if districtW18 == 10918
replace GB19_marginW18 = 53.56785 if districtW18 == 10919
replace GB19_marginW18 = 10.21239 if districtW18 == 10920
replace GB19_marginW18 = 30.99495 if districtW18 == 10921
replace GB19_marginW18 = 1.251647 if districtW18 == 10922
replace GB19_marginW18 = 19.9555 if districtW18 == 10923
replace GB19_marginW18 = 30.70823 if districtW18 == 10924
replace GB19_marginW18 = 11.5584 if districtW18 == 10925
replace GB19_marginW18 = 18.99094 if districtW18 == 10926
replace GB19_marginW18 = 47.63007 if districtW18 == 10927
replace GB19_marginW18 = 40.34807 if districtW18 == 10928
replace GB19_marginW18 = 48.93019 if districtW18 == 10929
replace GB19_marginW18 = 26.72519 if districtW18 == 10930
replace GB19_marginW18 = 38.43777 if districtW18 == 10931
replace GB19_marginW18 = 29.60583 if districtW18 == 10932
replace GB19_marginW18 = 43.98084 if districtW18 == 10933
replace GB19_marginW18 = 4.338926 if districtW18 == 10934
replace GB19_marginW18 = 36.22075 if districtW18 == 10935
replace GB19_marginW18 = 33.59513 if districtW18 == 10936
replace GB19_marginW18 = 17.84577 if districtW18 == 10937
replace GB19_marginW18 = 39.08489 if districtW18 == 10938
replace GB19_marginW18 = 62.70563 if districtW18 == 10939
replace GB19_marginW18 = 41.76861 if districtW18 == 10940
replace GB19_marginW18 = 34.04872 if districtW18 == 10941
replace GB19_marginW18 = 41.4913 if districtW18 == 10942
replace GB19_marginW18 = 20.82218 if districtW18 == 10943
replace GB19_marginW18 = 25.30225 if districtW18 == 10944
replace GB19_marginW18 = 56.49435 if districtW18 == 10945
replace GB19_marginW18 = 42.80693 if districtW18 == 10946
replace GB19_marginW18 = 13.05521 if districtW18 == 10947
replace GB19_marginW18 = 21.93879 if districtW18 == 10948
replace GB19_marginW18 = 34.86034 if districtW18 == 10949
replace GB19_marginW18 = 40.1559 if districtW18 == 10950
replace GB19_marginW18 = 23.54595 if districtW18 == 10951
replace GB19_marginW18 = 50.89768 if districtW18 == 10952
replace GB19_marginW18 = 14.6122 if districtW18 == 10953
replace GB19_marginW18 = 39.4025 if districtW18 == 10954
replace GB19_marginW18 = 9.485248 if districtW18 == 10955
replace GB19_marginW18 = 13.80851 if districtW18 == 10956
replace GB19_marginW18 = 31.0699 if districtW18 == 10957
replace GB19_marginW18 = 8.607307 if districtW18 == 10958
replace GB19_marginW18 = 37.15007 if districtW18 == 10959
replace GB19_marginW18 = 10.92554 if districtW18 == 10960
replace GB19_marginW18 = 29.62923 if districtW18 == 10961
replace GB19_marginW18 = 25.67019 if districtW18 == 10962
replace GB19_marginW18 = 38.00608 if districtW18 == 10963
replace GB19_marginW18 = 8.324742 if districtW18 == 10964
replace GB19_marginW18 = 28.10808 if districtW18 == 10965
replace GB19_marginW18 = 37.63057 if districtW18 == 10966
replace GB19_marginW18 = 6.953362 if districtW18 == 10967
replace GB19_marginW18 = 17.95609 if districtW18 == 10968
replace GB19_marginW18 = 24.06568 if districtW18 == 10969
replace GB19_marginW18 = 2.495384 if districtW18 == 10970
replace GB19_marginW18 = 9.598192 if districtW18 == 10971
replace GB19_marginW18 = 2.089179 if districtW18 == 10972
replace GB19_marginW18 = 15.66253 if districtW18 == 10973
replace GB19_marginW18 = 28.45925 if districtW18 == 10974
replace GB19_marginW18 = 40.01565 if districtW18 == 10975
replace GB19_marginW18 = 29.70299 if districtW18 == 10976
replace GB19_marginW18 = 36.28107 if districtW18 == 10977
replace GB19_marginW18 = 31.30253 if districtW18 == 10978
replace GB19_marginW18 = 32.79006 if districtW18 == 10979
replace GB19_marginW18 = 5.82436 if districtW18 == 10980
replace GB19_marginW18 = 35.21473 if districtW18 == 10981
replace GB19_marginW18 = 6.817553 if districtW18 == 10982
replace GB19_marginW18 = 31.28346 if districtW18 == 10983
replace GB19_marginW18 = 16.54089 if districtW18 == 10984
replace GB19_marginW18 = 36.83134 if districtW18 == 10985
replace GB19_marginW18 = 42.63071 if districtW18 == 10986
replace GB19_marginW18 = 35.50759 if districtW18 == 10987
replace GB19_marginW18 = 18.35784 if districtW18 == 10988
replace GB19_marginW18 = 25.54816 if districtW18 == 10989
replace GB19_marginW18 = 36.65358 if districtW18 == 10990
replace GB19_marginW18 = 33.04237 if districtW18 == 10991
replace GB19_marginW18 = 38.30231 if districtW18 == 10992
replace GB19_marginW18 = 44.45112 if districtW18 == 10993
replace GB19_marginW18 = 23.6759 if districtW18 == 10994
replace GB19_marginW18 = 24.18944 if districtW18 == 10995
replace GB19_marginW18 = 40.66059 if districtW18 == 10996
replace GB19_marginW18 = 47.26242 if districtW18 == 10997
replace GB19_marginW18 = 24.4677 if districtW18 == 10998
replace GB19_marginW18 = 35.19811 if districtW18 == 10999
replace GB19_marginW18 = 41.84162 if districtW18 == 11000
replace GB19_marginW18 = 24.38388 if districtW18 == 11001
replace GB19_marginW18 = 64.39944 if districtW18 == 11002
replace GB19_marginW18 = 7.705694 if districtW18 == 11003
replace GB19_marginW18 = 26.7978 if districtW18 == 11004
replace GB19_marginW18 = 21.89201 if districtW18 == 11005
replace GB19_marginW18 = 8.667952 if districtW18 == 11006
replace GB19_marginW18 = 14.96254 if districtW18 == 11007
replace GB19_marginW18 = 34.81441 if districtW18 == 11008
replace GB19_marginW18 = 7.457748 if districtW18 == 11009
replace GB19_marginW18 = 39.40893 if districtW18 == 11010
replace GB19_marginW18 = 32.73061 if districtW18 == 11011
replace GB19_marginW18 = 8.137128 if districtW18 == 11012
replace GB19_marginW18 = 63.85021 if districtW18 == 11013
replace GB19_marginW18 = 2.00943 if districtW18 == 11014
replace GB19_marginW18 = 18.83644 if districtW18 == 11015
replace GB19_marginW18 = 30.91114 if districtW18 == 11016
replace GB19_marginW18 = 3.233546 if districtW18 == 11017
replace GB19_marginW18 = 3.247225 if districtW18 == 11018
replace GB19_marginW18 = 1.455587 if districtW18 == 11019
replace GB19_marginW18 = 9.924558 if districtW18 == 11020
replace GB19_marginW18 = 7.634547 if districtW18 == 11021
replace GB19_marginW18 = 35.20898 if districtW18 == 11022
replace GB19_marginW18 = 42.12159 if districtW18 == 11023
replace GB19_marginW18 = 1.108199 if districtW18 == 11024
replace GB19_marginW18 = 35.7136 if districtW18 == 11025
replace GB19_marginW18 = 16.21178 if districtW18 == 11026
replace GB19_marginW18 = 21.04585 if districtW18 == 11027
replace GB19_marginW18 = 5.209714 if districtW18 == 11028
replace GB19_marginW18 = 4.428074 if districtW18 == 11029
replace GB19_marginW18 = 11.0247 if districtW18 == 11030
replace GB19_marginW18 = 23.15306 if districtW18 == 11031
replace GB19_marginW18 = 53.80067 if districtW18 == 11032
replace GB19_marginW18 = 15.82895 if districtW18 == 11033
replace GB19_marginW18 = 45.09206 if districtW18 == 11034
replace GB19_marginW18 = 42.58474 if districtW18 == 11035
replace GB19_marginW18 = 25.07283 if districtW18 == 11036
replace GB19_marginW18 = 3.668994 if districtW18 == 11037
replace GB19_marginW18 = 30.78541 if districtW18 == 11038
replace GB19_marginW18 = 14.93717 if districtW18 == 11039
replace GB19_marginW18 = 1.184303 if districtW18 == 11040
replace GB19_marginW18 = 1.672611 if districtW18 == 11041
replace GB19_marginW18 = 37.35628 if districtW18 == 11042
replace GB19_marginW18 = 14.01934 if districtW18 == 11043
replace GB19_marginW18 = 6.997066 if districtW18 == 11044
replace GB19_marginW18 = 48.80432 if districtW18 == 11045
replace GB19_marginW18 = 24.75654 if districtW18 == 11046
replace GB19_marginW18 = 18.10816 if districtW18 == 11047
replace GB19_marginW18 = 11.90864 if districtW18 == 11048
replace GB19_marginW18 = 11.90164 if districtW18 == 11049
replace GB19_marginW18 = 3.692851 if districtW18 == 11050
replace GB19_marginW18 = 4.037827 if districtW18 == 11051
replace GB19_marginW18 = 13.27753 if districtW18 == 11052
replace GB19_marginW18 = 10.0387 if districtW18 == 11053
replace GB19_marginW18 = 7.200214 if districtW18 == 11054
replace GB19_marginW18 = 27.12451 if districtW18 == 11055
replace GB19_marginW18 = 7.695961 if districtW18 == 11056
replace GB19_marginW18 = 31.70773 if districtW18 == 11057
replace GB19_marginW18 = 42.35083 if districtW18 == 11058
replace GB19_marginW18 = 23.22661 if districtW18 == 11059
replace GB19_marginW18 = 27.3051 if districtW18 == 11060
replace GB19_marginW18 = 27.36087 if districtW18 == 11061
replace GB19_marginW18 = 18.04073 if districtW18 == 11062
replace GB19_marginW18 = 4.285544 if districtW18 == 40001
replace GB19_marginW18 = 3.962314 if districtW18 == 40002
replace GB19_marginW18 = 32.5245 if districtW18 == 40003
replace GB19_marginW18 = 37.83199 if districtW18 == 40004
replace GB19_marginW18 = 17.99737 if districtW18 == 40005
replace GB19_marginW18 = 24.44405 if districtW18 == 40006
replace GB19_marginW18 = .1122892 if districtW18 == 40007
replace GB19_marginW18 = 36.29306 if districtW18 == 40008
replace GB19_marginW18 = 14.3134 if districtW18 == 40009
replace GB19_marginW18 = 21.37382 if districtW18 == 40010
replace GB19_marginW18 = 18.28905 if districtW18 == 40011
replace GB19_marginW18 = 28.87789 if districtW18 == 40012
replace GB19_marginW18 = 7.302609 if districtW18 == 40013
replace GB19_marginW18 = 6.257275 if districtW18 == 40014
replace GB19_marginW18 = 3.255498 if districtW18 == 40015
replace GB19_marginW18 = 18.86354 if districtW18 == 40016
replace GB19_marginW18 = 16.40524 if districtW18 == 40017
replace GB19_marginW18 = 18.15665 if districtW18 == 40018
replace GB19_marginW18 = 33.86524 if districtW18 == 20001
replace GB19_marginW18 = 8.742717 if districtW18 == 20002
replace GB19_marginW18 = 13.07704 if districtW18 == 20003
replace GB19_marginW18 = 8.790827 if districtW18 == 20004
replace GB19_marginW18 = 8.553589 if districtW18 == 20005
replace GB19_marginW18 = 4.998711 if districtW18 == 20006
replace GB19_marginW18 = 9.744438 if districtW18 == 20007
replace GB19_marginW18 = 9.686523 if districtW18 == 20008
replace GB19_marginW18 = .6485015 if districtW18 == 20009
replace GB19_marginW18 = 11.39812 if districtW18 == 20010
replace GB19_marginW18 = 11.66297 if districtW18 == 20011
replace GB19_marginW18 = 28.40257 if districtW18 == 20012
replace GB19_marginW18 = 3.509691 if districtW18 == 20013
replace GB19_marginW18 = 7.692307 if districtW18 == 20014
replace GB19_marginW18 = 29.54039 if districtW18 == 20015
replace GB19_marginW18 = 29.48363 if districtW18 == 20016
replace GB19_marginW18 = 20.00486 if districtW18 == 20017
replace GB19_marginW18 = .2809674 if districtW18 == 20018
replace GB19_marginW18 = 23.64698 if districtW18 == 20019
replace GB19_marginW18 = 6.64126 if districtW18 == 20020
replace GB19_marginW18 = 9.801832 if districtW18 == 20021
replace GB19_marginW18 = 21.78605 if districtW18 == 20022
replace GB19_marginW18 = 21.58264 if districtW18 == 20023
replace GB19_marginW18 = 22.30958 if districtW18 == 20024
replace GB19_marginW18 = 22.98441 if districtW18 == 20025
replace GB19_marginW18 = 6.911409 if districtW18 == 20026
replace GB19_marginW18 = 16.84051 if districtW18 == 20027
replace GB19_marginW18 = 26.75401 if districtW18 == 20028
replace GB19_marginW18 = 16.14262 if districtW18 == 20029
replace GB19_marginW18 = 14.46353 if districtW18 == 20030
replace GB19_marginW18 = 15.47622 if districtW18 == 20031
replace GB19_marginW18 = 7.510686 if districtW18 == 20032
replace GB19_marginW18 = 21.03687 if districtW18 == 20033
replace GB19_marginW18 = 18.98067 if districtW18 == 20034
replace GB19_marginW18 = 13.29823 if districtW18 == 20035
replace GB19_marginW18 = 28.29875 if districtW18 == 20036
replace GB19_marginW18 = 1.464698 if districtW18 == 20037
replace GB19_marginW18 = 18.82565 if districtW18 == 20038
replace GB19_marginW18 = 19.04762 if districtW18 == 20039
replace GB19_marginW18 = 26.57723 if districtW18 == 20040
replace GB19_marginW18 = 2.644399 if districtW18 == 20041
replace GB19_marginW18 = 9.773514 if districtW18 == 20042
replace GB19_marginW18 = 19.49978 if districtW18 == 20043
replace GB19_marginW18 = 24.60983 if districtW18 == 20044
replace GB19_marginW18 = 11.83094 if districtW18 == 20045
replace GB19_marginW18 = 1.05069 if districtW18 == 20046
replace GB19_marginW18 = 14.11076 if districtW18 == 20047
replace GB19_marginW18 = 17.69531 if districtW18 == 20048
replace GB19_marginW18 = 2.868479 if districtW18 == 20049
replace GB19_marginW18 = 7.780257 if districtW18 == 20050
replace GB19_marginW18 = 10.8247 if districtW18 == 20051
replace GB19_marginW18 = 23.95636 if districtW18 == 20052
replace GB19_marginW18 = 24.78647 if districtW18 == 20053
replace GB19_marginW18 = 13.96183 if districtW18 == 20054
replace GB19_marginW18 = 23.68507 if districtW18 == 20055
replace GB19_marginW18 = 9.722275 if districtW18 == 20056
replace GB19_marginW18 = 17.58647 if districtW18 == 20057
replace GB19_marginW18 = 1.58028 if districtW18 == 20058
replace GB19_marginW18 = 21.16305 if districtW18 == 20059
replace GB19_marginW18 = 5.384109 if districtW18 == 30041
replace GB19_marginW18 = 2.254367 if districtW18 == 30042
replace GB19_marginW18 = .495255 if districtW18 == 30043
replace GB19_marginW18 = 6.355124 if districtW18 == 30044
replace GB19_marginW18 = 12.21458 if districtW18 == 30045
replace GB19_marginW18 = 4.129758 if districtW18 == 30046
replace GB19_marginW18 = 22.65141 if districtW18 == 30047
replace GB19_marginW18 = 23.73507 if districtW18 == 30048
replace GB19_marginW18 = 33.1983 if districtW18 == 30049
replace GB19_marginW18 = 41.07647 if districtW18 == 30050
replace GB19_marginW18 = 13.25713 if districtW18 == 30051
replace GB19_marginW18 = 38.59388 if districtW18 == 30052
replace GB19_marginW18 = 10.06563 if districtW18 == 30053
replace GB19_marginW18 = 19.87773 if districtW18 == 30054
replace GB19_marginW18 = 5.490327 if districtW18 == 30055
replace GB19_marginW18 = 2.07676 if districtW18 == 30056
replace GB19_marginW18 = 9.565247 if districtW18 == 30057
replace GB19_marginW18 = 6.383181 if districtW18 == 30058
replace GB19_marginW18 = 16.78233 if districtW18 == 30059
replace GB19_marginW18 = 4.909575 if districtW18 == 30060
replace GB19_marginW18 = 15.83801 if districtW18 == 30061
replace GB19_marginW18 = 3.412658 if districtW18 == 30062
replace GB19_marginW18 = 35.4767 if districtW18 == 30063
replace GB19_marginW18 = 15.78108 if districtW18 == 30064
replace GB19_marginW18 = 11.93333 if districtW18 == 30065
replace GB19_marginW18 = 18.39056 if districtW18 == 30066
replace GB19_marginW18 = 4.411981 if districtW18 == 30067
replace GB19_marginW18 = 17.2584 if districtW18 == 30068
replace GB19_marginW18 = 15.33627 if districtW18 == 30069
replace GB19_marginW18 = 29.17714 if districtW18 == 30070
replace GB19_marginW18 = 32.8909 if districtW18 == 30071
replace GB19_marginW18 = 28.61445 if districtW18 == 30072
replace GB19_marginW18 = 2.73937 if districtW18 == 30073
replace GB19_marginW18 = 22.05425 if districtW18 == 30074
replace GB19_marginW18 = 15.07168 if districtW18 == 30075
replace GB19_marginW18 = 17.03268 if districtW18 == 30076
replace GB19_marginW18 = 15.90684 if districtW18 == 30077
replace GB19_marginW18 = 6.499168 if districtW18 == 30078
replace GB19_marginW18 = 23.79107 if districtW18 == 30079
replace GB19_marginW18 = 25.18239 if districtW18 == 30080

* Effective number of electoral parties

gen GB19_enepW17 = .

replace GB19_enepW17 = 2.390434 if districtW17 == 10530
replace GB19_enepW17 = 1.829163 if districtW17 == 10531
replace GB19_enepW17 = 2.634572 if districtW17 == 10532
replace GB19_enepW17 = 2.064292 if districtW17 == 10533
replace GB19_enepW17 = 2.454587 if districtW17 == 10534
replace GB19_enepW17 = 3.411302 if districtW17 == 10535
replace GB19_enepW17 = 2.242294 if districtW17 == 10536
replace GB19_enepW17 = 2.65225 if districtW17 == 10537
replace GB19_enepW17 = 2.593029 if districtW17 == 10538
replace GB19_enepW17 = 2.55197 if districtW17 == 10539
replace GB19_enepW17 = 2.217563 if districtW17 == 10540
replace GB19_enepW17 = 3.318668 if districtW17 == 10541
replace GB19_enepW17 = 3.300688 if districtW17 == 10542
replace GB19_enepW17 = 2.346342 if districtW17 == 10543
replace GB19_enepW17 = 1.995583 if districtW17 == 10544
replace GB19_enepW17 = 2.570248 if districtW17 == 10545
replace GB19_enepW17 = 2.519073 if districtW17 == 10546
replace GB19_enepW17 = 2.445991 if districtW17 == 10547
replace GB19_enepW17 = 3.028914 if districtW17 == 10548
replace GB19_enepW17 = 2.770381 if districtW17 == 10549
replace GB19_enepW17 = 2.437575 if districtW17 == 10550
replace GB19_enepW17 = 2.593947 if districtW17 == 10551
replace GB19_enepW17 = 2.61133 if districtW17 == 10552
replace GB19_enepW17 = 2.552742 if districtW17 == 10553
replace GB19_enepW17 = 2.472883 if districtW17 == 10554
replace GB19_enepW17 = 1.810455 if districtW17 == 10555
replace GB19_enepW17 = 2.213281 if districtW17 == 10556
replace GB19_enepW17 = 2.174041 if districtW17 == 10557
replace GB19_enepW17 = 2.223606 if districtW17 == 10558
replace GB19_enepW17 = 2.505661 if districtW17 == 10559
replace GB19_enepW17 = 2.533587 if districtW17 == 10560
replace GB19_enepW17 = 2.398072 if districtW17 == 10561
replace GB19_enepW17 = 2.035037 if districtW17 == 10562
replace GB19_enepW17 = 1.556152 if districtW17 == 10563
replace GB19_enepW17 = 1.553542 if districtW17 == 10564
replace GB19_enepW17 = 2.505468 if districtW17 == 10565
replace GB19_enepW17 = 2.113037 if districtW17 == 10566
replace GB19_enepW17 = 2.404483 if districtW17 == 10567
replace GB19_enepW17 = 2.50246 if districtW17 == 10568
replace GB19_enepW17 = 2.363444 if districtW17 == 10569
replace GB19_enepW17 = 2.067076 if districtW17 == 10570
replace GB19_enepW17 = 2.221207 if districtW17 == 10571
replace GB19_enepW17 = 2.17382 if districtW17 == 10572
replace GB19_enepW17 = 2.511294 if districtW17 == 10573
replace GB19_enepW17 = 3.23525 if districtW17 == 10574
replace GB19_enepW17 = 2.775773 if districtW17 == 10575
replace GB19_enepW17 = 2.197435 if districtW17 == 10576
replace GB19_enepW17 = 2.746994 if districtW17 == 10577
replace GB19_enepW17 = 2.452772 if districtW17 == 10578
replace GB19_enepW17 = 2.467815 if districtW17 == 10579
replace GB19_enepW17 = 2.230469 if districtW17 == 10580
replace GB19_enepW17 = 1.552059 if districtW17 == 10581
replace GB19_enepW17 = 1.628248 if districtW17 == 10582
replace GB19_enepW17 = 2.15081 if districtW17 == 10583
replace GB19_enepW17 = 2.653439 if districtW17 == 10584
replace GB19_enepW17 = 2.520218 if districtW17 == 10585
replace GB19_enepW17 = 2.406438 if districtW17 == 10586
replace GB19_enepW17 = 2.201734 if districtW17 == 10587
replace GB19_enepW17 = 2.602833 if districtW17 == 10588
replace GB19_enepW17 = 1.648818 if districtW17 == 10589
replace GB19_enepW17 = 1.995389 if districtW17 == 10590
replace GB19_enepW17 = 2.09012 if districtW17 == 10591
replace GB19_enepW17 = 2.453366 if districtW17 == 10592
replace GB19_enepW17 = 2.686435 if districtW17 == 10593
replace GB19_enepW17 = 1.966764 if districtW17 == 10594
replace GB19_enepW17 = 2.248405 if districtW17 == 10595
replace GB19_enepW17 = 1.803066 if districtW17 == 10596
replace GB19_enepW17 = 2.532063 if districtW17 == 10597
replace GB19_enepW17 = 2.441352 if districtW17 == 10598
replace GB19_enepW17 = 2.530192 if districtW17 == 10599
replace GB19_enepW17 = 2.51168 if districtW17 == 10600
replace GB19_enepW17 = 2.686448 if districtW17 == 10601
replace GB19_enepW17 = 2.157523 if districtW17 == 10602
replace GB19_enepW17 = 2.345739 if districtW17 == 10603
replace GB19_enepW17 = 2.624725 if districtW17 == 10604
replace GB19_enepW17 = 2.164531 if districtW17 == 10605
replace GB19_enepW17 = 2.033382 if districtW17 == 10606
replace GB19_enepW17 = 2.576982 if districtW17 == 10607
replace GB19_enepW17 = 2.357069 if districtW17 == 10608
replace GB19_enepW17 = 3.172551 if districtW17 == 10609
replace GB19_enepW17 = 2.140073 if districtW17 == 10610
replace GB19_enepW17 = 2.337949 if districtW17 == 10611
replace GB19_enepW17 = 2.621117 if districtW17 == 10612
replace GB19_enepW17 = 2.275272 if districtW17 == 10613
replace GB19_enepW17 = 2.236114 if districtW17 == 10614
replace GB19_enepW17 = 1.875161 if districtW17 == 10615
replace GB19_enepW17 = 2.399575 if districtW17 == 10616
replace GB19_enepW17 = 2.88627 if districtW17 == 10617
replace GB19_enepW17 = 1.869042 if districtW17 == 10618
replace GB19_enepW17 = 2.268728 if districtW17 == 10619
replace GB19_enepW17 = 2.285734 if districtW17 == 10620
replace GB19_enepW17 = 2.739348 if districtW17 == 10621
replace GB19_enepW17 = 1.611319 if districtW17 == 10622
replace GB19_enepW17 = 2.551647 if districtW17 == 10623
replace GB19_enepW17 = 2.208679 if districtW17 == 10624
replace GB19_enepW17 = 2.149473 if districtW17 == 10625
replace GB19_enepW17 = 1.980269 if districtW17 == 10626
replace GB19_enepW17 = 2.4947 if districtW17 == 10627
replace GB19_enepW17 = 2.451545 if districtW17 == 10628
replace GB19_enepW17 = 2.706607 if districtW17 == 10629
replace GB19_enepW17 = 2.234564 if districtW17 == 10630
replace GB19_enepW17 = 2.528645 if districtW17 == 10631
replace GB19_enepW17 = 3.141882 if districtW17 == 10632
replace GB19_enepW17 = 2.442597 if districtW17 == 10633
replace GB19_enepW17 = 2.229609 if districtW17 == 10634
replace GB19_enepW17 = 2.345702 if districtW17 == 10635
replace GB19_enepW17 = 2.546388 if districtW17 == 10636
replace GB19_enepW17 = 1.933941 if districtW17 == 10637
replace GB19_enepW17 = 2.103758 if districtW17 == 10638
replace GB19_enepW17 = 3.053048 if districtW17 == 10639
replace GB19_enepW17 = 2.503749 if districtW17 == 10640
replace GB19_enepW17 = 3.233942 if districtW17 == 10641
replace GB19_enepW17 = 1.814745 if districtW17 == 10642
replace GB19_enepW17 = 1.881263 if districtW17 == 10643
replace GB19_enepW17 = 2.617932 if districtW17 == 10644
replace GB19_enepW17 = 2.503281 if districtW17 == 10645
replace GB19_enepW17 = 2.325059 if districtW17 == 10646
replace GB19_enepW17 = 2.215877 if districtW17 == 10647
replace GB19_enepW17 = 2.193672 if districtW17 == 10648
replace GB19_enepW17 = 2.453014 if districtW17 == 10649
replace GB19_enepW17 = 2.591044 if districtW17 == 10650
replace GB19_enepW17 = 2.657793 if districtW17 == 10651
replace GB19_enepW17 = 2.285052 if districtW17 == 10652
replace GB19_enepW17 = 2.351448 if districtW17 == 10653
replace GB19_enepW17 = 2.435998 if districtW17 == 10654
replace GB19_enepW17 = 2.06825 if districtW17 == 10655
replace GB19_enepW17 = 2.576677 if districtW17 == 10656
replace GB19_enepW17 = 2.527196 if districtW17 == 10657
replace GB19_enepW17 = 2.506585 if districtW17 == 10658
replace GB19_enepW17 = 2.095365 if districtW17 == 10659
replace GB19_enepW17 = 2.127998 if districtW17 == 10660
replace GB19_enepW17 = 2.66299 if districtW17 == 10661
replace GB19_enepW17 = 2.697871 if districtW17 == 10662
replace GB19_enepW17 = 2.473089 if districtW17 == 10663
replace GB19_enepW17 = 2.374949 if districtW17 == 10664
replace GB19_enepW17 = 2.220048 if districtW17 == 10665
replace GB19_enepW17 = 2.442417 if districtW17 == 10666
replace GB19_enepW17 = 3.018568 if districtW17 == 10667
replace GB19_enepW17 = 3.232416 if districtW17 == 10668
replace GB19_enepW17 = 3.322005 if districtW17 == 10669
replace GB19_enepW17 = 2.302869 if districtW17 == 10670
replace GB19_enepW17 = 2.003223 if districtW17 == 10671
replace GB19_enepW17 = 1.894797 if districtW17 == 10672
replace GB19_enepW17 = 2.070092 if districtW17 == 10673
replace GB19_enepW17 = 2.720747 if districtW17 == 10674
replace GB19_enepW17 = 2.332967 if districtW17 == 10675
replace GB19_enepW17 = 2.312885 if districtW17 == 10676
replace GB19_enepW17 = 3.141574 if districtW17 == 10677
replace GB19_enepW17 = 2.356119 if districtW17 == 10678
replace GB19_enepW17 = 1.640966 if districtW17 == 10679
replace GB19_enepW17 = 2.390016 if districtW17 == 10680
replace GB19_enepW17 = 2.409142 if districtW17 == 10681
replace GB19_enepW17 = 2.47299 if districtW17 == 10682
replace GB19_enepW17 = 2.135249 if districtW17 == 10683
replace GB19_enepW17 = 2.421726 if districtW17 == 10684
replace GB19_enepW17 = 2.4485 if districtW17 == 10685
replace GB19_enepW17 = 2.472368 if districtW17 == 10686
replace GB19_enepW17 = 2.040706 if districtW17 == 10687
replace GB19_enepW17 = 2.413692 if districtW17 == 10688
replace GB19_enepW17 = 2.359723 if districtW17 == 10689
replace GB19_enepW17 = 2.592868 if districtW17 == 10690
replace GB19_enepW17 = 2.418401 if districtW17 == 10691
replace GB19_enepW17 = 2.519992 if districtW17 == 10692
replace GB19_enepW17 = 2.133701 if districtW17 == 10693
replace GB19_enepW17 = 2.682271 if districtW17 == 10694
replace GB19_enepW17 = 2.259396 if districtW17 == 10695
replace GB19_enepW17 = 2.575007 if districtW17 == 10696
replace GB19_enepW17 = 2.231437 if districtW17 == 10697
replace GB19_enepW17 = 2.432673 if districtW17 == 10698
replace GB19_enepW17 = 2.175222 if districtW17 == 10699
replace GB19_enepW17 = 2.197389 if districtW17 == 10700
replace GB19_enepW17 = 2.478726 if districtW17 == 10701
replace GB19_enepW17 = 2.523277 if districtW17 == 10702
replace GB19_enepW17 = 2.833805 if districtW17 == 10703
replace GB19_enepW17 = 2.3211 if districtW17 == 10704
replace GB19_enepW17 = 2.237453 if districtW17 == 10705
replace GB19_enepW17 = 2.253646 if districtW17 == 10706
replace GB19_enepW17 = 2.010795 if districtW17 == 10707
replace GB19_enepW17 = 1.825378 if districtW17 == 10708
replace GB19_enepW17 = 2.407842 if districtW17 == 10709
replace GB19_enepW17 = 2.466848 if districtW17 == 10710
replace GB19_enepW17 = 2.172434 if districtW17 == 10711
replace GB19_enepW17 = 2.354815 if districtW17 == 10712
replace GB19_enepW17 = 2.038287 if districtW17 == 10713
replace GB19_enepW17 = 2.072605 if districtW17 == 10714
replace GB19_enepW17 = 2.095222 if districtW17 == 10715
replace GB19_enepW17 = 2.413673 if districtW17 == 10716
replace GB19_enepW17 = 2.006269 if districtW17 == 10717
replace GB19_enepW17 = 2.546026 if districtW17 == 10718
replace GB19_enepW17 = 2.729552 if districtW17 == 10719
replace GB19_enepW17 = 1.916251 if districtW17 == 10720
replace GB19_enepW17 = 1.787091 if districtW17 == 10721
replace GB19_enepW17 = 2.127409 if districtW17 == 10722
replace GB19_enepW17 = 2.587022 if districtW17 == 10723
replace GB19_enepW17 = 2.232362 if districtW17 == 10724
replace GB19_enepW17 = 2.165401 if districtW17 == 10725
replace GB19_enepW17 = 2.441217 if districtW17 == 10726
replace GB19_enepW17 = 2.846954 if districtW17 == 10727
replace GB19_enepW17 = 2.529937 if districtW17 == 10728
replace GB19_enepW17 = 1.992404 if districtW17 == 10729
replace GB19_enepW17 = 2.417874 if districtW17 == 10730
replace GB19_enepW17 = 2.243021 if districtW17 == 10731
replace GB19_enepW17 = 2.489279 if districtW17 == 10732
replace GB19_enepW17 = 3.392617 if districtW17 == 10733
replace GB19_enepW17 = 2.274281 if districtW17 == 10734
replace GB19_enepW17 = 2.334764 if districtW17 == 10735
replace GB19_enepW17 = 2.09854 if districtW17 == 10736
replace GB19_enepW17 = 2.298391 if districtW17 == 10737
replace GB19_enepW17 = 2.476529 if districtW17 == 10738
replace GB19_enepW17 = 2.413763 if districtW17 == 10739
replace GB19_enepW17 = 3.502468 if districtW17 == 10740
replace GB19_enepW17 = 2.411891 if districtW17 == 10741
replace GB19_enepW17 = 2.457382 if districtW17 == 10742
replace GB19_enepW17 = 2.278031 if districtW17 == 10743
replace GB19_enepW17 = 2.548815 if districtW17 == 10744
replace GB19_enepW17 = 2.196965 if districtW17 == 10745
replace GB19_enepW17 = 2.446196 if districtW17 == 10746
replace GB19_enepW17 = 2.712512 if districtW17 == 10747
replace GB19_enepW17 = 2.413919 if districtW17 == 10748
replace GB19_enepW17 = 2.663444 if districtW17 == 10749
replace GB19_enepW17 = 2.173674 if districtW17 == 10750
replace GB19_enepW17 = 2.04108 if districtW17 == 10751
replace GB19_enepW17 = 2.427374 if districtW17 == 10752
replace GB19_enepW17 = 2.494715 if districtW17 == 10753
replace GB19_enepW17 = 3.303984 if districtW17 == 10754
replace GB19_enepW17 = 2.350415 if districtW17 == 10755
replace GB19_enepW17 = 2.600171 if districtW17 == 10756
replace GB19_enepW17 = 2.660006 if districtW17 == 10757
replace GB19_enepW17 = 2.429969 if districtW17 == 10758
replace GB19_enepW17 = 2.382013 if districtW17 == 10759
replace GB19_enepW17 = 2.085165 if districtW17 == 10760
replace GB19_enepW17 = 2.430262 if districtW17 == 10761
replace GB19_enepW17 = 2.510206 if districtW17 == 10762
replace GB19_enepW17 = 2.197221 if districtW17 == 10763
replace GB19_enepW17 = 2.583445 if districtW17 == 10764
replace GB19_enepW17 = 3.344099 if districtW17 == 10765
replace GB19_enepW17 = 2.343758 if districtW17 == 10766
replace GB19_enepW17 = 2.478909 if districtW17 == 10767
replace GB19_enepW17 = 2.971569 if districtW17 == 10768
replace GB19_enepW17 = 2.270212 if districtW17 == 10769
replace GB19_enepW17 = 2.576527 if districtW17 == 10770
replace GB19_enepW17 = 3.1891 if districtW17 == 10771
replace GB19_enepW17 = 2.873551 if districtW17 == 10772
replace GB19_enepW17 = 3.026686 if districtW17 == 10773
replace GB19_enepW17 = 2.30876 if districtW17 == 10774
replace GB19_enepW17 = 1.506901 if districtW17 == 10775
replace GB19_enepW17 = 2.519183 if districtW17 == 10776
replace GB19_enepW17 = 2.274027 if districtW17 == 10777
replace GB19_enepW17 = 2.603117 if districtW17 == 10778
replace GB19_enepW17 = 2.490921 if districtW17 == 10779
replace GB19_enepW17 = 2.886759 if districtW17 == 10780
replace GB19_enepW17 = 2.536276 if districtW17 == 10781
replace GB19_enepW17 = 2.433933 if districtW17 == 10782
replace GB19_enepW17 = 1.994815 if districtW17 == 10783
replace GB19_enepW17 = 2.535824 if districtW17 == 10784
replace GB19_enepW17 = 2.626352 if districtW17 == 10785
replace GB19_enepW17 = 2.37017 if districtW17 == 10786
replace GB19_enepW17 = 2.408371 if districtW17 == 10787
replace GB19_enepW17 = 2.32484 if districtW17 == 10788
replace GB19_enepW17 = 1.891044 if districtW17 == 10789
replace GB19_enepW17 = 2.152802 if districtW17 == 10790
replace GB19_enepW17 = 2.12055 if districtW17 == 10791
replace GB19_enepW17 = 2.492276 if districtW17 == 10792
replace GB19_enepW17 = 1.609367 if districtW17 == 10793
replace GB19_enepW17 = 1.374011 if districtW17 == 10794
replace GB19_enepW17 = 1.843922 if districtW17 == 10795
replace GB19_enepW17 = 1.625422 if districtW17 == 10796
replace GB19_enepW17 = 2.420543 if districtW17 == 10797
replace GB19_enepW17 = 1.769845 if districtW17 == 10798
replace GB19_enepW17 = 2.155964 if districtW17 == 10799
replace GB19_enepW17 = 2.380776 if districtW17 == 10800
replace GB19_enepW17 = 2.666737 if districtW17 == 10801
replace GB19_enepW17 = 2.529396 if districtW17 == 10802
replace GB19_enepW17 = 2.416178 if districtW17 == 10803
replace GB19_enepW17 = 2.3413 if districtW17 == 10804
replace GB19_enepW17 = 2.926865 if districtW17 == 10805
replace GB19_enepW17 = 1.819509 if districtW17 == 10806
replace GB19_enepW17 = 1.90346 if districtW17 == 10807
replace GB19_enepW17 = 1.619349 if districtW17 == 10808
replace GB19_enepW17 = 2.017055 if districtW17 == 10809
replace GB19_enepW17 = 1.982313 if districtW17 == 10810
replace GB19_enepW17 = 2.120051 if districtW17 == 10811
replace GB19_enepW17 = 2.169912 if districtW17 == 10812
replace GB19_enepW17 = 2.369334 if districtW17 == 10813
replace GB19_enepW17 = 2.308977 if districtW17 == 10814
replace GB19_enepW17 = 2.174421 if districtW17 == 10815
replace GB19_enepW17 = 2.185404 if districtW17 == 10816
replace GB19_enepW17 = 2.655822 if districtW17 == 10817
replace GB19_enepW17 = 2.050278 if districtW17 == 10818
replace GB19_enepW17 = 2.905927 if districtW17 == 10819
replace GB19_enepW17 = 2.138027 if districtW17 == 10820
replace GB19_enepW17 = 2.452355 if districtW17 == 10821
replace GB19_enepW17 = 2.442111 if districtW17 == 10822
replace GB19_enepW17 = 2.248571 if districtW17 == 10823
replace GB19_enepW17 = 2.330252 if districtW17 == 10824
replace GB19_enepW17 = 2.312596 if districtW17 == 10825
replace GB19_enepW17 = 2.242019 if districtW17 == 10826
replace GB19_enepW17 = 2.165009 if districtW17 == 10827
replace GB19_enepW17 = 2.201944 if districtW17 == 10828
replace GB19_enepW17 = 2.144718 if districtW17 == 10829
replace GB19_enepW17 = 2.323943 if districtW17 == 10830
replace GB19_enepW17 = 2.476081 if districtW17 == 10831
replace GB19_enepW17 = 2.304568 if districtW17 == 10832
replace GB19_enepW17 = 2.990575 if districtW17 == 10833
replace GB19_enepW17 = 2.444139 if districtW17 == 10834
replace GB19_enepW17 = 2.560616 if districtW17 == 10835
replace GB19_enepW17 = 3.31749 if districtW17 == 10836
replace GB19_enepW17 = 2.198316 if districtW17 == 10837
replace GB19_enepW17 = 2.379835 if districtW17 == 10838
replace GB19_enepW17 = 2.16298 if districtW17 == 10839
replace GB19_enepW17 = 3.106953 if districtW17 == 10840
replace GB19_enepW17 = 2.412445 if districtW17 == 10841
replace GB19_enepW17 = 1.787708 if districtW17 == 10842
replace GB19_enepW17 = 2.197171 if districtW17 == 10843
replace GB19_enepW17 = 2.327942 if districtW17 == 10844
replace GB19_enepW17 = 2.488894 if districtW17 == 10845
replace GB19_enepW17 = 2.765096 if districtW17 == 10846
replace GB19_enepW17 = 2.251951 if districtW17 == 10847
replace GB19_enepW17 = 2.260167 if districtW17 == 10848
replace GB19_enepW17 = 2.204463 if districtW17 == 10849
replace GB19_enepW17 = 2.674773 if districtW17 == 10850
replace GB19_enepW17 = 2.244372 if districtW17 == 10851
replace GB19_enepW17 = 2.139609 if districtW17 == 10852
replace GB19_enepW17 = 2.802168 if districtW17 == 10853
replace GB19_enepW17 = 1.966326 if districtW17 == 10854
replace GB19_enepW17 = 2.207759 if districtW17 == 10855
replace GB19_enepW17 = 2.927499 if districtW17 == 10856
replace GB19_enepW17 = 2.255552 if districtW17 == 10857
replace GB19_enepW17 = 2.157861 if districtW17 == 10858
replace GB19_enepW17 = 2.032601 if districtW17 == 10859
replace GB19_enepW17 = 2.303437 if districtW17 == 10860
replace GB19_enepW17 = 2.271194 if districtW17 == 10861
replace GB19_enepW17 = 2.355089 if districtW17 == 10862
replace GB19_enepW17 = 2.36962 if districtW17 == 10863
replace GB19_enepW17 = 2.59793 if districtW17 == 10864
replace GB19_enepW17 = 2.159693 if districtW17 == 10865
replace GB19_enepW17 = 2.62032 if districtW17 == 10866
replace GB19_enepW17 = 2.503768 if districtW17 == 10867
replace GB19_enepW17 = 2.128355 if districtW17 == 10868
replace GB19_enepW17 = 2.084703 if districtW17 == 10869
replace GB19_enepW17 = 2.783439 if districtW17 == 10870
replace GB19_enepW17 = 2.470505 if districtW17 == 10871
replace GB19_enepW17 = 2.185302 if districtW17 == 10872
replace GB19_enepW17 = 2.55849 if districtW17 == 10873
replace GB19_enepW17 = 2.30279 if districtW17 == 10874
replace GB19_enepW17 = 2.189916 if districtW17 == 10875
replace GB19_enepW17 = 2.797182 if districtW17 == 10876
replace GB19_enepW17 = 2.344358 if districtW17 == 10877
replace GB19_enepW17 = 2.539853 if districtW17 == 10878
replace GB19_enepW17 = 2.125586 if districtW17 == 10879
replace GB19_enepW17 = 2.584058 if districtW17 == 10880
replace GB19_enepW17 = 2.422375 if districtW17 == 10881
replace GB19_enepW17 = 2.241893 if districtW17 == 10882
replace GB19_enepW17 = 2.193263 if districtW17 == 10883
replace GB19_enepW17 = 2.567501 if districtW17 == 10884
replace GB19_enepW17 = 2.202672 if districtW17 == 10885
replace GB19_enepW17 = 2.376377 if districtW17 == 10886
replace GB19_enepW17 = 2.775943 if districtW17 == 10887
replace GB19_enepW17 = 1.784438 if districtW17 == 10888
replace GB19_enepW17 = 2.580859 if districtW17 == 10889
replace GB19_enepW17 = 2.471098 if districtW17 == 10890
replace GB19_enepW17 = 2.770808 if districtW17 == 10891
replace GB19_enepW17 = 2.087895 if districtW17 == 10892
replace GB19_enepW17 = 2.701631 if districtW17 == 10893
replace GB19_enepW17 = 2.246978 if districtW17 == 10894
replace GB19_enepW17 = 2.229444 if districtW17 == 10895
replace GB19_enepW17 = 2.200633 if districtW17 == 10896
replace GB19_enepW17 = 2.663633 if districtW17 == 10897
replace GB19_enepW17 = 2.274117 if districtW17 == 10898
replace GB19_enepW17 = 2.217012 if districtW17 == 10899
replace GB19_enepW17 = 2.031587 if districtW17 == 10900
replace GB19_enepW17 = 2.400526 if districtW17 == 10901
replace GB19_enepW17 = 2.184168 if districtW17 == 10902
replace GB19_enepW17 = 3.056094 if districtW17 == 10903
replace GB19_enepW17 = 3.216738 if districtW17 == 10904
replace GB19_enepW17 = 2.293473 if districtW17 == 10905
replace GB19_enepW17 = 2.545549 if districtW17 == 10906
replace GB19_enepW17 = 2.660927 if districtW17 == 10907
replace GB19_enepW17 = 2.67948 if districtW17 == 10908
replace GB19_enepW17 = 2.270591 if districtW17 == 10909
replace GB19_enepW17 = 2.208872 if districtW17 == 10910
replace GB19_enepW17 = 2.52931 if districtW17 == 10911
replace GB19_enepW17 = 2.558424 if districtW17 == 10912
replace GB19_enepW17 = 2.3025 if districtW17 == 10913
replace GB19_enepW17 = 2.337367 if districtW17 == 10914
replace GB19_enepW17 = 2.743548 if districtW17 == 10915
replace GB19_enepW17 = 2.40918 if districtW17 == 10916
replace GB19_enepW17 = 2.309724 if districtW17 == 10917
replace GB19_enepW17 = 2.335425 if districtW17 == 10918
replace GB19_enepW17 = 2.100488 if districtW17 == 10919
replace GB19_enepW17 = 2.811439 if districtW17 == 10920
replace GB19_enepW17 = 2.524503 if districtW17 == 10921
replace GB19_enepW17 = 3.334459 if districtW17 == 10922
replace GB19_enepW17 = 2.790205 if districtW17 == 10923
replace GB19_enepW17 = 2.155263 if districtW17 == 10924
replace GB19_enepW17 = 2.401042 if districtW17 == 10925
replace GB19_enepW17 = 2.504768 if districtW17 == 10926
replace GB19_enepW17 = 1.992082 if districtW17 == 10927
replace GB19_enepW17 = 2.411755 if districtW17 == 10928
replace GB19_enepW17 = 2.032266 if districtW17 == 10929
replace GB19_enepW17 = 2.307138 if districtW17 == 10930
replace GB19_enepW17 = 2.41312 if districtW17 == 10931
replace GB19_enepW17 = 2.502613 if districtW17 == 10932
replace GB19_enepW17 = 2.023032 if districtW17 == 10933
replace GB19_enepW17 = 2.4707 if districtW17 == 10934
replace GB19_enepW17 = 2.123849 if districtW17 == 10935
replace GB19_enepW17 = 2.365863 if districtW17 == 10936
replace GB19_enepW17 = 2.631235 if districtW17 == 10937
replace GB19_enepW17 = 2.385312 if districtW17 == 10938
replace GB19_enepW17 = 1.668406 if districtW17 == 10939
replace GB19_enepW17 = 2.12698 if districtW17 == 10940
replace GB19_enepW17 = 2.407304 if districtW17 == 10941
replace GB19_enepW17 = 2.228577 if districtW17 == 10942
replace GB19_enepW17 = 2.275031 if districtW17 == 10943
replace GB19_enepW17 = 3.44645 if districtW17 == 10944
replace GB19_enepW17 = 1.765135 if districtW17 == 10945
replace GB19_enepW17 = 2.254067 if districtW17 == 10946
replace GB19_enepW17 = 2.30112 if districtW17 == 10947
replace GB19_enepW17 = 2.289971 if districtW17 == 10948
replace GB19_enepW17 = 2.260601 if districtW17 == 10949
replace GB19_enepW17 = 2.205862 if districtW17 == 10950
replace GB19_enepW17 = 2.95619 if districtW17 == 10951
replace GB19_enepW17 = 1.935908 if districtW17 == 10952
replace GB19_enepW17 = 2.267911 if districtW17 == 10953
replace GB19_enepW17 = 2.332731 if districtW17 == 10954
replace GB19_enepW17 = 2.343118 if districtW17 == 10955
replace GB19_enepW17 = 2.631777 if districtW17 == 10956
replace GB19_enepW17 = 2.257505 if districtW17 == 10957
replace GB19_enepW17 = 2.524569 if districtW17 == 10958
replace GB19_enepW17 = 2.390392 if districtW17 == 10959
replace GB19_enepW17 = 2.423548 if districtW17 == 10960
replace GB19_enepW17 = 2.517851 if districtW17 == 10961
replace GB19_enepW17 = 2.762241 if districtW17 == 10962
replace GB19_enepW17 = 2.489774 if districtW17 == 10963
replace GB19_enepW17 = 2.399442 if districtW17 == 10964
replace GB19_enepW17 = 2.257246 if districtW17 == 10965
replace GB19_enepW17 = 2.025789 if districtW17 == 10966
replace GB19_enepW17 = 2.809599 if districtW17 == 10967
replace GB19_enepW17 = 2.414166 if districtW17 == 10968
replace GB19_enepW17 = 2.729144 if districtW17 == 10969
replace GB19_enepW17 = 2.765216 if districtW17 == 10970
replace GB19_enepW17 = 2.332523 if districtW17 == 10971
replace GB19_enepW17 = 2.511374 if districtW17 == 10972
replace GB19_enepW17 = 2.428548 if districtW17 == 10973
replace GB19_enepW17 = 1.990839 if districtW17 == 10974
replace GB19_enepW17 = 2.131709 if districtW17 == 10975
replace GB19_enepW17 = 2.172345 if districtW17 == 10976
replace GB19_enepW17 = 2.272064 if districtW17 == 10977
replace GB19_enepW17 = 2.60692 if districtW17 == 10978
replace GB19_enepW17 = 2.247453 if districtW17 == 10979
replace GB19_enepW17 = 2.424186 if districtW17 == 10980
replace GB19_enepW17 = 2.563542 if districtW17 == 10981
replace GB19_enepW17 = 3.104565 if districtW17 == 10982
replace GB19_enepW17 = 2.33801 if districtW17 == 10983
replace GB19_enepW17 = 2.614083 if districtW17 == 10984
replace GB19_enepW17 = 2.290291 if districtW17 == 10985
replace GB19_enepW17 = 2.002211 if districtW17 == 10986
replace GB19_enepW17 = 2.441679 if districtW17 == 10987
replace GB19_enepW17 = 2.389697 if districtW17 == 10988
replace GB19_enepW17 = 2.100649 if districtW17 == 10989
replace GB19_enepW17 = 2.414347 if districtW17 == 10990
replace GB19_enepW17 = 2.4086 if districtW17 == 10991
replace GB19_enepW17 = 2.109786 if districtW17 == 10992
replace GB19_enepW17 = 2.236945 if districtW17 == 10993
replace GB19_enepW17 = 2.187167 if districtW17 == 10994
replace GB19_enepW17 = 2.160862 if districtW17 == 10995
replace GB19_enepW17 = 2.356772 if districtW17 == 10996
replace GB19_enepW17 = 2.250113 if districtW17 == 10997
replace GB19_enepW17 = 2.637686 if districtW17 == 10998
replace GB19_enepW17 = 2.346686 if districtW17 == 10999
replace GB19_enepW17 = 2.349215 if districtW17 == 11000
replace GB19_enepW17 = 2.533637 if districtW17 == 11001
replace GB19_enepW17 = 1.672936 if districtW17 == 11002
replace GB19_enepW17 = 2.67381 if districtW17 == 11003
replace GB19_enepW17 = 2.462917 if districtW17 == 11004
replace GB19_enepW17 = 2.280283 if districtW17 == 11005
replace GB19_enepW17 = 2.548314 if districtW17 == 11006
replace GB19_enepW17 = 2.364026 if districtW17 == 11007
replace GB19_enepW17 = 2.561029 if districtW17 == 11008
replace GB19_enepW17 = 2.580095 if districtW17 == 11009
replace GB19_enepW17 = 2.084443 if districtW17 == 11010
replace GB19_enepW17 = 1.977895 if districtW17 == 11011
replace GB19_enepW17 = 2.422069 if districtW17 == 11012
replace GB19_enepW17 = 1.668706 if districtW17 == 11013
replace GB19_enepW17 = 2.843626 if districtW17 == 11014
replace GB19_enepW17 = 2.612827 if districtW17 == 11015
replace GB19_enepW17 = 2.322785 if districtW17 == 11016
replace GB19_enepW17 = 2.696621 if districtW17 == 11017
replace GB19_enepW17 = 2.528534 if districtW17 == 11018
replace GB19_enepW17 = 2.63214 if districtW17 == 11019
replace GB19_enepW17 = 3.205665 if districtW17 == 11020
replace GB19_enepW17 = 2.65775 if districtW17 == 11021
replace GB19_enepW17 = 2.153549 if districtW17 == 11022
replace GB19_enepW17 = 2.319406 if districtW17 == 11023
replace GB19_enepW17 = 2.507254 if districtW17 == 11024
replace GB19_enepW17 = 2.155181 if districtW17 == 11025
replace GB19_enepW17 = 2.26745 if districtW17 == 11026
replace GB19_enepW17 = 2.539671 if districtW17 == 11027
replace GB19_enepW17 = 3.160097 if districtW17 == 11028
replace GB19_enepW17 = 2.497088 if districtW17 == 11029
replace GB19_enepW17 = 2.40567 if districtW17 == 11030
replace GB19_enepW17 = 2.402276 if districtW17 == 11031
replace GB19_enepW17 = 1.90872 if districtW17 == 11032
replace GB19_enepW17 = 2.448091 if districtW17 == 11033
replace GB19_enepW17 = 2.057797 if districtW17 == 11034
replace GB19_enepW17 = 2.323328 if districtW17 == 11035
replace GB19_enepW17 = 2.527684 if districtW17 == 11036
replace GB19_enepW17 = 2.239742 if districtW17 == 11037
replace GB19_enepW17 = 2.387894 if districtW17 == 11038
replace GB19_enepW17 = 2.937077 if districtW17 == 11039
replace GB19_enepW17 = 2.921765 if districtW17 == 11040
replace GB19_enepW17 = 2.210355 if districtW17 == 11041
replace GB19_enepW17 = 2.422138 if districtW17 == 11042
replace GB19_enepW17 = 2.465245 if districtW17 == 11043
replace GB19_enepW17 = 2.455013 if districtW17 == 11044
replace GB19_enepW17 = 2.048267 if districtW17 == 11045
replace GB19_enepW17 = 2.390707 if districtW17 == 11046
replace GB19_enepW17 = 2.760797 if districtW17 == 11047
replace GB19_enepW17 = 2.506659 if districtW17 == 11048
replace GB19_enepW17 = 2.335 if districtW17 == 11049
replace GB19_enepW17 = 2.481299 if districtW17 == 11050
replace GB19_enepW17 = 2.314395 if districtW17 == 11051
replace GB19_enepW17 = 2.46744 if districtW17 == 11052
replace GB19_enepW17 = 2.49962 if districtW17 == 11053
replace GB19_enepW17 = 2.726044 if districtW17 == 11054
replace GB19_enepW17 = 2.459423 if districtW17 == 11055
replace GB19_enepW17 = 2.77186 if districtW17 == 11056
replace GB19_enepW17 = 2.258536 if districtW17 == 11057
replace GB19_enepW17 = 2.061222 if districtW17 == 11058
replace GB19_enepW17 = 2.602791 if districtW17 == 11059
replace GB19_enepW17 = 2.26206 if districtW17 == 11060
replace GB19_enepW17 = 2.553804 if districtW17 == 11061
replace GB19_enepW17 = 2.669393 if districtW17 == 11062
replace GB19_enepW17 = 2.237576 if districtW17 == 40001
replace GB19_enepW17 = 2.398503 if districtW17 == 40002
replace GB19_enepW17 = 2.4436 if districtW17 == 40003
replace GB19_enepW17 = 2.914082 if districtW17 == 40004
replace GB19_enepW17 = 3.26833 if districtW17 == 40005
replace GB19_enepW17 = 4.118884 if districtW17 == 40006
replace GB19_enepW17 = 2.619407 if districtW17 == 40007
replace GB19_enepW17 = 2.616206 if districtW17 == 40008
replace GB19_enepW17 = 3.250467 if districtW17 == 40009
replace GB19_enepW17 = 3.322552 if districtW17 == 40010
replace GB19_enepW17 = 3.907406 if districtW17 == 40011
replace GB19_enepW17 = 3.341931 if districtW17 == 40012
replace GB19_enepW17 = 2.743623 if districtW17 == 40013
replace GB19_enepW17 = 3.839926 if districtW17 == 40014
replace GB19_enepW17 = 4.20014 if districtW17 == 40015
replace GB19_enepW17 = 3.12309 if districtW17 == 40016
replace GB19_enepW17 = 3.724066 if districtW17 == 40017
replace GB19_enepW17 = 3.905175 if districtW17 == 40018
replace GB19_enepW17 = 2.803378 if districtW17 == 20001
replace GB19_enepW17 = 2.875067 if districtW17 == 20002
replace GB19_enepW17 = 2.956172 if districtW17 == 20003
replace GB19_enepW17 = 2.439405 if districtW17 == 20004
replace GB19_enepW17 = 2.93542 if districtW17 == 20005
replace GB19_enepW17 = 2.796583 if districtW17 == 20006
replace GB19_enepW17 = 2.387378 if districtW17 == 20007
replace GB19_enepW17 = 2.540197 if districtW17 == 20008
replace GB19_enepW17 = 3.286247 if districtW17 == 20009
replace GB19_enepW17 = 2.804746 if districtW17 == 20010
replace GB19_enepW17 = 2.749329 if districtW17 == 20011
replace GB19_enepW17 = 2.703964 if districtW17 == 20012
replace GB19_enepW17 = 2.692589 if districtW17 == 20013
replace GB19_enepW17 = 2.69716 if districtW17 == 20014
replace GB19_enepW17 = 2.684814 if districtW17 == 20015
replace GB19_enepW17 = 2.718467 if districtW17 == 20016
replace GB19_enepW17 = 3.257612 if districtW17 == 20017
replace GB19_enepW17 = 3.315993 if districtW17 == 20018
replace GB19_enepW17 = 3.160132 if districtW17 == 20019
replace GB19_enepW17 = 3.41146 if districtW17 == 20020
replace GB19_enepW17 = 2.88653 if districtW17 == 20021
replace GB19_enepW17 = 3.019795 if districtW17 == 20022
replace GB19_enepW17 = 3.475144 if districtW17 == 20023
replace GB19_enepW17 = 3.065245 if districtW17 == 20024
replace GB19_enepW17 = 3.144562 if districtW17 == 20025
replace GB19_enepW17 = 3.286851 if districtW17 == 20026
replace GB19_enepW17 = 2.987434 if districtW17 == 20027
replace GB19_enepW17 = 2.768979 if districtW17 == 20028
replace GB19_enepW17 = 2.745468 if districtW17 == 20029
replace GB19_enepW17 = 2.763849 if districtW17 == 20030
replace GB19_enepW17 = 2.97716 if districtW17 == 20031
replace GB19_enepW17 = 2.582916 if districtW17 == 20032
replace GB19_enepW17 = 2.824533 if districtW17 == 20033
replace GB19_enepW17 = 2.958673 if districtW17 == 20034
replace GB19_enepW17 = 2.747248 if districtW17 == 20035
replace GB19_enepW17 = 2.890392 if districtW17 == 20036
replace GB19_enepW17 = 2.72634 if districtW17 == 20037
replace GB19_enepW17 = 2.858925 if districtW17 == 20038
replace GB19_enepW17 = 3.022197 if districtW17 == 20039
replace GB19_enepW17 = 2.810323 if districtW17 == 20040
replace GB19_enepW17 = 3.616171 if districtW17 == 20041
replace GB19_enepW17 = 3.094719 if districtW17 == 20042
replace GB19_enepW17 = 3.371163 if districtW17 == 20043
replace GB19_enepW17 = 3.102626 if districtW17 == 20044
replace GB19_enepW17 = 3.195436 if districtW17 == 20045
replace GB19_enepW17 = 2.466022 if districtW17 == 20046
replace GB19_enepW17 = 2.877905 if districtW17 == 20047
replace GB19_enepW17 = 2.835748 if districtW17 == 20048
replace GB19_enepW17 = 2.735927 if districtW17 == 20049
replace GB19_enepW17 = 2.655375 if districtW17 == 20050
replace GB19_enepW17 = 3.00941 if districtW17 == 20051
replace GB19_enepW17 = 3.025947 if districtW17 == 20052
replace GB19_enepW17 = 2.83796 if districtW17 == 20053
replace GB19_enepW17 = 2.516508 if districtW17 == 20054
replace GB19_enepW17 = 3.045757 if districtW17 == 20055
replace GB19_enepW17 = 2.946178 if districtW17 == 20056
replace GB19_enepW17 = 2.607392 if districtW17 == 20057
replace GB19_enepW17 = 2.729239 if districtW17 == 20058
replace GB19_enepW17 = 2.858731 if districtW17 == 20059
replace GB19_enepW17 = 3.323154 if districtW17 == 30041
replace GB19_enepW17 = 2.703111 if districtW17 == 30042
replace GB19_enepW17 = 2.737456 if districtW17 == 30043
replace GB19_enepW17 = 2.741129 if districtW17 == 30044
replace GB19_enepW17 = 3.220429 if districtW17 == 30045
replace GB19_enepW17 = 2.610378 if districtW17 == 30046
replace GB19_enepW17 = 2.75196 if districtW17 == 30047
replace GB19_enepW17 = 2.777322 if districtW17 == 30048
replace GB19_enepW17 = 2.847367 if districtW17 == 30049
replace GB19_enepW17 = 2.279256 if districtW17 == 30050
replace GB19_enepW17 = 2.613542 if districtW17 == 30051
replace GB19_enepW17 = 2.810709 if districtW17 == 30052
replace GB19_enepW17 = 3.290047 if districtW17 == 30053
replace GB19_enepW17 = 2.590157 if districtW17 == 30054
replace GB19_enepW17 = 2.792667 if districtW17 == 30055
replace GB19_enepW17 = 2.70023 if districtW17 == 30056
replace GB19_enepW17 = 2.811688 if districtW17 == 30057
replace GB19_enepW17 = 2.627559 if districtW17 == 30058
replace GB19_enepW17 = 2.594195 if districtW17 == 30059
replace GB19_enepW17 = 2.547976 if districtW17 == 30060
replace GB19_enepW17 = 2.780941 if districtW17 == 30061
replace GB19_enepW17 = 2.654282 if districtW17 == 30062
replace GB19_enepW17 = 2.366531 if districtW17 == 30063
replace GB19_enepW17 = 3.987428 if districtW17 == 30064
replace GB19_enepW17 = 2.44833 if districtW17 == 30065
replace GB19_enepW17 = 2.472936 if districtW17 == 30066
replace GB19_enepW17 = 3.151858 if districtW17 == 30067
replace GB19_enepW17 = 2.378701 if districtW17 == 30068
replace GB19_enepW17 = 3.440978 if districtW17 == 30069
replace GB19_enepW17 = 2.999309 if districtW17 == 30070
replace GB19_enepW17 = 2.975081 if districtW17 == 30071
replace GB19_enepW17 = 3.071379 if districtW17 == 30072
replace GB19_enepW17 = 2.810082 if districtW17 == 30073
replace GB19_enepW17 = 2.94144 if districtW17 == 30074
replace GB19_enepW17 = 3.239469 if districtW17 == 30075
replace GB19_enepW17 = 3.148347 if districtW17 == 30076
replace GB19_enepW17 = 3.23778 if districtW17 == 30077
replace GB19_enepW17 = 2.275404 if districtW17 == 30078
replace GB19_enepW17 = 2.787835 if districtW17 == 30079
replace GB19_enepW17 = 2.599182 if districtW17 == 30080

gen GB19_enepW18 = .

replace GB19_enepW18 = 2.390434 if districtW18 == 10530
replace GB19_enepW18 = 1.829163 if districtW18 == 10531
replace GB19_enepW18 = 2.634572 if districtW18 == 10532
replace GB19_enepW18 = 2.064292 if districtW18 == 10533
replace GB19_enepW18 = 2.454587 if districtW18 == 10534
replace GB19_enepW18 = 3.411302 if districtW18 == 10535
replace GB19_enepW18 = 2.242294 if districtW18 == 10536
replace GB19_enepW18 = 2.65225 if districtW18 == 10537
replace GB19_enepW18 = 2.593029 if districtW18 == 10538
replace GB19_enepW18 = 2.55197 if districtW18 == 10539
replace GB19_enepW18 = 2.217563 if districtW18 == 10540
replace GB19_enepW18 = 3.318668 if districtW18 == 10541
replace GB19_enepW18 = 3.300688 if districtW18 == 10542
replace GB19_enepW18 = 2.346342 if districtW18 == 10543
replace GB19_enepW18 = 1.995583 if districtW18 == 10544
replace GB19_enepW18 = 2.570248 if districtW18 == 10545
replace GB19_enepW18 = 2.519073 if districtW18 == 10546
replace GB19_enepW18 = 2.445991 if districtW18 == 10547
replace GB19_enepW18 = 3.028914 if districtW18 == 10548
replace GB19_enepW18 = 2.770381 if districtW18 == 10549
replace GB19_enepW18 = 2.437575 if districtW18 == 10550
replace GB19_enepW18 = 2.593947 if districtW18 == 10551
replace GB19_enepW18 = 2.61133 if districtW18 == 10552
replace GB19_enepW18 = 2.552742 if districtW18 == 10553
replace GB19_enepW18 = 2.472883 if districtW18 == 10554
replace GB19_enepW18 = 1.810455 if districtW18 == 10555
replace GB19_enepW18 = 2.213281 if districtW18 == 10556
replace GB19_enepW18 = 2.174041 if districtW18 == 10557
replace GB19_enepW18 = 2.223606 if districtW18 == 10558
replace GB19_enepW18 = 2.505661 if districtW18 == 10559
replace GB19_enepW18 = 2.533587 if districtW18 == 10560
replace GB19_enepW18 = 2.398072 if districtW18 == 10561
replace GB19_enepW18 = 2.035037 if districtW18 == 10562
replace GB19_enepW18 = 1.556152 if districtW18 == 10563
replace GB19_enepW18 = 1.553542 if districtW18 == 10564
replace GB19_enepW18 = 2.505468 if districtW18 == 10565
replace GB19_enepW18 = 2.113037 if districtW18 == 10566
replace GB19_enepW18 = 2.404483 if districtW18 == 10567
replace GB19_enepW18 = 2.50246 if districtW18 == 10568
replace GB19_enepW18 = 2.363444 if districtW18 == 10569
replace GB19_enepW18 = 2.067076 if districtW18 == 10570
replace GB19_enepW18 = 2.221207 if districtW18 == 10571
replace GB19_enepW18 = 2.17382 if districtW18 == 10572
replace GB19_enepW18 = 2.511294 if districtW18 == 10573
replace GB19_enepW18 = 3.23525 if districtW18 == 10574
replace GB19_enepW18 = 2.775773 if districtW18 == 10575
replace GB19_enepW18 = 2.197435 if districtW18 == 10576
replace GB19_enepW18 = 2.746994 if districtW18 == 10577
replace GB19_enepW18 = 2.452772 if districtW18 == 10578
replace GB19_enepW18 = 2.467815 if districtW18 == 10579
replace GB19_enepW18 = 2.230469 if districtW18 == 10580
replace GB19_enepW18 = 1.552059 if districtW18 == 10581
replace GB19_enepW18 = 1.628248 if districtW18 == 10582
replace GB19_enepW18 = 2.15081 if districtW18 == 10583
replace GB19_enepW18 = 2.653439 if districtW18 == 10584
replace GB19_enepW18 = 2.520218 if districtW18 == 10585
replace GB19_enepW18 = 2.406438 if districtW18 == 10586
replace GB19_enepW18 = 2.201734 if districtW18 == 10587
replace GB19_enepW18 = 2.602833 if districtW18 == 10588
replace GB19_enepW18 = 1.648818 if districtW18 == 10589
replace GB19_enepW18 = 1.995389 if districtW18 == 10590
replace GB19_enepW18 = 2.09012 if districtW18 == 10591
replace GB19_enepW18 = 2.453366 if districtW18 == 10592
replace GB19_enepW18 = 2.686435 if districtW18 == 10593
replace GB19_enepW18 = 1.966764 if districtW18 == 10594
replace GB19_enepW18 = 2.248405 if districtW18 == 10595
replace GB19_enepW18 = 1.803066 if districtW18 == 10596
replace GB19_enepW18 = 2.532063 if districtW18 == 10597
replace GB19_enepW18 = 2.441352 if districtW18 == 10598
replace GB19_enepW18 = 2.530192 if districtW18 == 10599
replace GB19_enepW18 = 2.51168 if districtW18 == 10600
replace GB19_enepW18 = 2.686448 if districtW18 == 10601
replace GB19_enepW18 = 2.157523 if districtW18 == 10602
replace GB19_enepW18 = 2.345739 if districtW18 == 10603
replace GB19_enepW18 = 2.624725 if districtW18 == 10604
replace GB19_enepW18 = 2.164531 if districtW18 == 10605
replace GB19_enepW18 = 2.033382 if districtW18 == 10606
replace GB19_enepW18 = 2.576982 if districtW18 == 10607
replace GB19_enepW18 = 2.357069 if districtW18 == 10608
replace GB19_enepW18 = 3.172551 if districtW18 == 10609
replace GB19_enepW18 = 2.140073 if districtW18 == 10610
replace GB19_enepW18 = 2.337949 if districtW18 == 10611
replace GB19_enepW18 = 2.621117 if districtW18 == 10612
replace GB19_enepW18 = 2.275272 if districtW18 == 10613
replace GB19_enepW18 = 2.236114 if districtW18 == 10614
replace GB19_enepW18 = 1.875161 if districtW18 == 10615
replace GB19_enepW18 = 2.399575 if districtW18 == 10616
replace GB19_enepW18 = 2.88627 if districtW18 == 10617
replace GB19_enepW18 = 1.869042 if districtW18 == 10618
replace GB19_enepW18 = 2.268728 if districtW18 == 10619
replace GB19_enepW18 = 2.285734 if districtW18 == 10620
replace GB19_enepW18 = 2.739348 if districtW18 == 10621
replace GB19_enepW18 = 1.611319 if districtW18 == 10622
replace GB19_enepW18 = 2.551647 if districtW18 == 10623
replace GB19_enepW18 = 2.208679 if districtW18 == 10624
replace GB19_enepW18 = 2.149473 if districtW18 == 10625
replace GB19_enepW18 = 1.980269 if districtW18 == 10626
replace GB19_enepW18 = 2.4947 if districtW18 == 10627
replace GB19_enepW18 = 2.451545 if districtW18 == 10628
replace GB19_enepW18 = 2.706607 if districtW18 == 10629
replace GB19_enepW18 = 2.234564 if districtW18 == 10630
replace GB19_enepW18 = 2.528645 if districtW18 == 10631
replace GB19_enepW18 = 3.141882 if districtW18 == 10632
replace GB19_enepW18 = 2.442597 if districtW18 == 10633
replace GB19_enepW18 = 2.229609 if districtW18 == 10634
replace GB19_enepW18 = 2.345702 if districtW18 == 10635
replace GB19_enepW18 = 2.546388 if districtW18 == 10636
replace GB19_enepW18 = 1.933941 if districtW18 == 10637
replace GB19_enepW18 = 2.103758 if districtW18 == 10638
replace GB19_enepW18 = 3.053048 if districtW18 == 10639
replace GB19_enepW18 = 2.503749 if districtW18 == 10640
replace GB19_enepW18 = 3.233942 if districtW18 == 10641
replace GB19_enepW18 = 1.814745 if districtW18 == 10642
replace GB19_enepW18 = 1.881263 if districtW18 == 10643
replace GB19_enepW18 = 2.617932 if districtW18 == 10644
replace GB19_enepW18 = 2.503281 if districtW18 == 10645
replace GB19_enepW18 = 2.325059 if districtW18 == 10646
replace GB19_enepW18 = 2.215877 if districtW18 == 10647
replace GB19_enepW18 = 2.193672 if districtW18 == 10648
replace GB19_enepW18 = 2.453014 if districtW18 == 10649
replace GB19_enepW18 = 2.591044 if districtW18 == 10650
replace GB19_enepW18 = 2.657793 if districtW18 == 10651
replace GB19_enepW18 = 2.285052 if districtW18 == 10652
replace GB19_enepW18 = 2.351448 if districtW18 == 10653
replace GB19_enepW18 = 2.435998 if districtW18 == 10654
replace GB19_enepW18 = 2.06825 if districtW18 == 10655
replace GB19_enepW18 = 2.576677 if districtW18 == 10656
replace GB19_enepW18 = 2.527196 if districtW18 == 10657
replace GB19_enepW18 = 2.506585 if districtW18 == 10658
replace GB19_enepW18 = 2.095365 if districtW18 == 10659
replace GB19_enepW18 = 2.127998 if districtW18 == 10660
replace GB19_enepW18 = 2.66299 if districtW18 == 10661
replace GB19_enepW18 = 2.697871 if districtW18 == 10662
replace GB19_enepW18 = 2.473089 if districtW18 == 10663
replace GB19_enepW18 = 2.374949 if districtW18 == 10664
replace GB19_enepW18 = 2.220048 if districtW18 == 10665
replace GB19_enepW18 = 2.442417 if districtW18 == 10666
replace GB19_enepW18 = 3.018568 if districtW18 == 10667
replace GB19_enepW18 = 3.232416 if districtW18 == 10668
replace GB19_enepW18 = 3.322005 if districtW18 == 10669
replace GB19_enepW18 = 2.302869 if districtW18 == 10670
replace GB19_enepW18 = 2.003223 if districtW18 == 10671
replace GB19_enepW18 = 1.894797 if districtW18 == 10672
replace GB19_enepW18 = 2.070092 if districtW18 == 10673
replace GB19_enepW18 = 2.720747 if districtW18 == 10674
replace GB19_enepW18 = 2.332967 if districtW18 == 10675
replace GB19_enepW18 = 2.312885 if districtW18 == 10676
replace GB19_enepW18 = 3.141574 if districtW18 == 10677
replace GB19_enepW18 = 2.356119 if districtW18 == 10678
replace GB19_enepW18 = 1.640966 if districtW18 == 10679
replace GB19_enepW18 = 2.390016 if districtW18 == 10680
replace GB19_enepW18 = 2.409142 if districtW18 == 10681
replace GB19_enepW18 = 2.47299 if districtW18 == 10682
replace GB19_enepW18 = 2.135249 if districtW18 == 10683
replace GB19_enepW18 = 2.421726 if districtW18 == 10684
replace GB19_enepW18 = 2.4485 if districtW18 == 10685
replace GB19_enepW18 = 2.472368 if districtW18 == 10686
replace GB19_enepW18 = 2.040706 if districtW18 == 10687
replace GB19_enepW18 = 2.413692 if districtW18 == 10688
replace GB19_enepW18 = 2.359723 if districtW18 == 10689
replace GB19_enepW18 = 2.592868 if districtW18 == 10690
replace GB19_enepW18 = 2.418401 if districtW18 == 10691
replace GB19_enepW18 = 2.519992 if districtW18 == 10692
replace GB19_enepW18 = 2.133701 if districtW18 == 10693
replace GB19_enepW18 = 2.682271 if districtW18 == 10694
replace GB19_enepW18 = 2.259396 if districtW18 == 10695
replace GB19_enepW18 = 2.575007 if districtW18 == 10696
replace GB19_enepW18 = 2.231437 if districtW18 == 10697
replace GB19_enepW18 = 2.432673 if districtW18 == 10698
replace GB19_enepW18 = 2.175222 if districtW18 == 10699
replace GB19_enepW18 = 2.197389 if districtW18 == 10700
replace GB19_enepW18 = 2.478726 if districtW18 == 10701
replace GB19_enepW18 = 2.523277 if districtW18 == 10702
replace GB19_enepW18 = 2.833805 if districtW18 == 10703
replace GB19_enepW18 = 2.3211 if districtW18 == 10704
replace GB19_enepW18 = 2.237453 if districtW18 == 10705
replace GB19_enepW18 = 2.253646 if districtW18 == 10706
replace GB19_enepW18 = 2.010795 if districtW18 == 10707
replace GB19_enepW18 = 1.825378 if districtW18 == 10708
replace GB19_enepW18 = 2.407842 if districtW18 == 10709
replace GB19_enepW18 = 2.466848 if districtW18 == 10710
replace GB19_enepW18 = 2.172434 if districtW18 == 10711
replace GB19_enepW18 = 2.354815 if districtW18 == 10712
replace GB19_enepW18 = 2.038287 if districtW18 == 10713
replace GB19_enepW18 = 2.072605 if districtW18 == 10714
replace GB19_enepW18 = 2.095222 if districtW18 == 10715
replace GB19_enepW18 = 2.413673 if districtW18 == 10716
replace GB19_enepW18 = 2.006269 if districtW18 == 10717
replace GB19_enepW18 = 2.546026 if districtW18 == 10718
replace GB19_enepW18 = 2.729552 if districtW18 == 10719
replace GB19_enepW18 = 1.916251 if districtW18 == 10720
replace GB19_enepW18 = 1.787091 if districtW18 == 10721
replace GB19_enepW18 = 2.127409 if districtW18 == 10722
replace GB19_enepW18 = 2.587022 if districtW18 == 10723
replace GB19_enepW18 = 2.232362 if districtW18 == 10724
replace GB19_enepW18 = 2.165401 if districtW18 == 10725
replace GB19_enepW18 = 2.441217 if districtW18 == 10726
replace GB19_enepW18 = 2.846954 if districtW18 == 10727
replace GB19_enepW18 = 2.529937 if districtW18 == 10728
replace GB19_enepW18 = 1.992404 if districtW18 == 10729
replace GB19_enepW18 = 2.417874 if districtW18 == 10730
replace GB19_enepW18 = 2.243021 if districtW18 == 10731
replace GB19_enepW18 = 2.489279 if districtW18 == 10732
replace GB19_enepW18 = 3.392617 if districtW18 == 10733
replace GB19_enepW18 = 2.274281 if districtW18 == 10734
replace GB19_enepW18 = 2.334764 if districtW18 == 10735
replace GB19_enepW18 = 2.09854 if districtW18 == 10736
replace GB19_enepW18 = 2.298391 if districtW18 == 10737
replace GB19_enepW18 = 2.476529 if districtW18 == 10738
replace GB19_enepW18 = 2.413763 if districtW18 == 10739
replace GB19_enepW18 = 3.502468 if districtW18 == 10740
replace GB19_enepW18 = 2.411891 if districtW18 == 10741
replace GB19_enepW18 = 2.457382 if districtW18 == 10742
replace GB19_enepW18 = 2.278031 if districtW18 == 10743
replace GB19_enepW18 = 2.548815 if districtW18 == 10744
replace GB19_enepW18 = 2.196965 if districtW18 == 10745
replace GB19_enepW18 = 2.446196 if districtW18 == 10746
replace GB19_enepW18 = 2.712512 if districtW18 == 10747
replace GB19_enepW18 = 2.413919 if districtW18 == 10748
replace GB19_enepW18 = 2.663444 if districtW18 == 10749
replace GB19_enepW18 = 2.173674 if districtW18 == 10750
replace GB19_enepW18 = 2.04108 if districtW18 == 10751
replace GB19_enepW18 = 2.427374 if districtW18 == 10752
replace GB19_enepW18 = 2.494715 if districtW18 == 10753
replace GB19_enepW18 = 3.303984 if districtW18 == 10754
replace GB19_enepW18 = 2.350415 if districtW18 == 10755
replace GB19_enepW18 = 2.600171 if districtW18 == 10756
replace GB19_enepW18 = 2.660006 if districtW18 == 10757
replace GB19_enepW18 = 2.429969 if districtW18 == 10758
replace GB19_enepW18 = 2.382013 if districtW18 == 10759
replace GB19_enepW18 = 2.085165 if districtW18 == 10760
replace GB19_enepW18 = 2.430262 if districtW18 == 10761
replace GB19_enepW18 = 2.510206 if districtW18 == 10762
replace GB19_enepW18 = 2.197221 if districtW18 == 10763
replace GB19_enepW18 = 2.583445 if districtW18 == 10764
replace GB19_enepW18 = 3.344099 if districtW18 == 10765
replace GB19_enepW18 = 2.343758 if districtW18 == 10766
replace GB19_enepW18 = 2.478909 if districtW18 == 10767
replace GB19_enepW18 = 2.971569 if districtW18 == 10768
replace GB19_enepW18 = 2.270212 if districtW18 == 10769
replace GB19_enepW18 = 2.576527 if districtW18 == 10770
replace GB19_enepW18 = 3.1891 if districtW18 == 10771
replace GB19_enepW18 = 2.873551 if districtW18 == 10772
replace GB19_enepW18 = 3.026686 if districtW18 == 10773
replace GB19_enepW18 = 2.30876 if districtW18 == 10774
replace GB19_enepW18 = 1.506901 if districtW18 == 10775
replace GB19_enepW18 = 2.519183 if districtW18 == 10776
replace GB19_enepW18 = 2.274027 if districtW18 == 10777
replace GB19_enepW18 = 2.603117 if districtW18 == 10778
replace GB19_enepW18 = 2.490921 if districtW18 == 10779
replace GB19_enepW18 = 2.886759 if districtW18 == 10780
replace GB19_enepW18 = 2.536276 if districtW18 == 10781
replace GB19_enepW18 = 2.433933 if districtW18 == 10782
replace GB19_enepW18 = 1.994815 if districtW18 == 10783
replace GB19_enepW18 = 2.535824 if districtW18 == 10784
replace GB19_enepW18 = 2.626352 if districtW18 == 10785
replace GB19_enepW18 = 2.37017 if districtW18 == 10786
replace GB19_enepW18 = 2.408371 if districtW18 == 10787
replace GB19_enepW18 = 2.32484 if districtW18 == 10788
replace GB19_enepW18 = 1.891044 if districtW18 == 10789
replace GB19_enepW18 = 2.152802 if districtW18 == 10790
replace GB19_enepW18 = 2.12055 if districtW18 == 10791
replace GB19_enepW18 = 2.492276 if districtW18 == 10792
replace GB19_enepW18 = 1.609367 if districtW18 == 10793
replace GB19_enepW18 = 1.374011 if districtW18 == 10794
replace GB19_enepW18 = 1.843922 if districtW18 == 10795
replace GB19_enepW18 = 1.625422 if districtW18 == 10796
replace GB19_enepW18 = 2.420543 if districtW18 == 10797
replace GB19_enepW18 = 1.769845 if districtW18 == 10798
replace GB19_enepW18 = 2.155964 if districtW18 == 10799
replace GB19_enepW18 = 2.380776 if districtW18 == 10800
replace GB19_enepW18 = 2.666737 if districtW18 == 10801
replace GB19_enepW18 = 2.529396 if districtW18 == 10802
replace GB19_enepW18 = 2.416178 if districtW18 == 10803
replace GB19_enepW18 = 2.3413 if districtW18 == 10804
replace GB19_enepW18 = 2.926865 if districtW18 == 10805
replace GB19_enepW18 = 1.819509 if districtW18 == 10806
replace GB19_enepW18 = 1.90346 if districtW18 == 10807
replace GB19_enepW18 = 1.619349 if districtW18 == 10808
replace GB19_enepW18 = 2.017055 if districtW18 == 10809
replace GB19_enepW18 = 1.982313 if districtW18 == 10810
replace GB19_enepW18 = 2.120051 if districtW18 == 10811
replace GB19_enepW18 = 2.169912 if districtW18 == 10812
replace GB19_enepW18 = 2.369334 if districtW18 == 10813
replace GB19_enepW18 = 2.308977 if districtW18 == 10814
replace GB19_enepW18 = 2.174421 if districtW18 == 10815
replace GB19_enepW18 = 2.185404 if districtW18 == 10816
replace GB19_enepW18 = 2.655822 if districtW18 == 10817
replace GB19_enepW18 = 2.050278 if districtW18 == 10818
replace GB19_enepW18 = 2.905927 if districtW18 == 10819
replace GB19_enepW18 = 2.138027 if districtW18 == 10820
replace GB19_enepW18 = 2.452355 if districtW18 == 10821
replace GB19_enepW18 = 2.442111 if districtW18 == 10822
replace GB19_enepW18 = 2.248571 if districtW18 == 10823
replace GB19_enepW18 = 2.330252 if districtW18 == 10824
replace GB19_enepW18 = 2.312596 if districtW18 == 10825
replace GB19_enepW18 = 2.242019 if districtW18 == 10826
replace GB19_enepW18 = 2.165009 if districtW18 == 10827
replace GB19_enepW18 = 2.201944 if districtW18 == 10828
replace GB19_enepW18 = 2.144718 if districtW18 == 10829
replace GB19_enepW18 = 2.323943 if districtW18 == 10830
replace GB19_enepW18 = 2.476081 if districtW18 == 10831
replace GB19_enepW18 = 2.304568 if districtW18 == 10832
replace GB19_enepW18 = 2.990575 if districtW18 == 10833
replace GB19_enepW18 = 2.444139 if districtW18 == 10834
replace GB19_enepW18 = 2.560616 if districtW18 == 10835
replace GB19_enepW18 = 3.31749 if districtW18 == 10836
replace GB19_enepW18 = 2.198316 if districtW18 == 10837
replace GB19_enepW18 = 2.379835 if districtW18 == 10838
replace GB19_enepW18 = 2.16298 if districtW18 == 10839
replace GB19_enepW18 = 3.106953 if districtW18 == 10840
replace GB19_enepW18 = 2.412445 if districtW18 == 10841
replace GB19_enepW18 = 1.787708 if districtW18 == 10842
replace GB19_enepW18 = 2.197171 if districtW18 == 10843
replace GB19_enepW18 = 2.327942 if districtW18 == 10844
replace GB19_enepW18 = 2.488894 if districtW18 == 10845
replace GB19_enepW18 = 2.765096 if districtW18 == 10846
replace GB19_enepW18 = 2.251951 if districtW18 == 10847
replace GB19_enepW18 = 2.260167 if districtW18 == 10848
replace GB19_enepW18 = 2.204463 if districtW18 == 10849
replace GB19_enepW18 = 2.674773 if districtW18 == 10850
replace GB19_enepW18 = 2.244372 if districtW18 == 10851
replace GB19_enepW18 = 2.139609 if districtW18 == 10852
replace GB19_enepW18 = 2.802168 if districtW18 == 10853
replace GB19_enepW18 = 1.966326 if districtW18 == 10854
replace GB19_enepW18 = 2.207759 if districtW18 == 10855
replace GB19_enepW18 = 2.927499 if districtW18 == 10856
replace GB19_enepW18 = 2.255552 if districtW18 == 10857
replace GB19_enepW18 = 2.157861 if districtW18 == 10858
replace GB19_enepW18 = 2.032601 if districtW18 == 10859
replace GB19_enepW18 = 2.303437 if districtW18 == 10860
replace GB19_enepW18 = 2.271194 if districtW18 == 10861
replace GB19_enepW18 = 2.355089 if districtW18 == 10862
replace GB19_enepW18 = 2.36962 if districtW18 == 10863
replace GB19_enepW18 = 2.59793 if districtW18 == 10864
replace GB19_enepW18 = 2.159693 if districtW18 == 10865
replace GB19_enepW18 = 2.62032 if districtW18 == 10866
replace GB19_enepW18 = 2.503768 if districtW18 == 10867
replace GB19_enepW18 = 2.128355 if districtW18 == 10868
replace GB19_enepW18 = 2.084703 if districtW18 == 10869
replace GB19_enepW18 = 2.783439 if districtW18 == 10870
replace GB19_enepW18 = 2.470505 if districtW18 == 10871
replace GB19_enepW18 = 2.185302 if districtW18 == 10872
replace GB19_enepW18 = 2.55849 if districtW18 == 10873
replace GB19_enepW18 = 2.30279 if districtW18 == 10874
replace GB19_enepW18 = 2.189916 if districtW18 == 10875
replace GB19_enepW18 = 2.797182 if districtW18 == 10876
replace GB19_enepW18 = 2.344358 if districtW18 == 10877
replace GB19_enepW18 = 2.539853 if districtW18 == 10878
replace GB19_enepW18 = 2.125586 if districtW18 == 10879
replace GB19_enepW18 = 2.584058 if districtW18 == 10880
replace GB19_enepW18 = 2.422375 if districtW18 == 10881
replace GB19_enepW18 = 2.241893 if districtW18 == 10882
replace GB19_enepW18 = 2.193263 if districtW18 == 10883
replace GB19_enepW18 = 2.567501 if districtW18 == 10884
replace GB19_enepW18 = 2.202672 if districtW18 == 10885
replace GB19_enepW18 = 2.376377 if districtW18 == 10886
replace GB19_enepW18 = 2.775943 if districtW18 == 10887
replace GB19_enepW18 = 1.784438 if districtW18 == 10888
replace GB19_enepW18 = 2.580859 if districtW18 == 10889
replace GB19_enepW18 = 2.471098 if districtW18 == 10890
replace GB19_enepW18 = 2.770808 if districtW18 == 10891
replace GB19_enepW18 = 2.087895 if districtW18 == 10892
replace GB19_enepW18 = 2.701631 if districtW18 == 10893
replace GB19_enepW18 = 2.246978 if districtW18 == 10894
replace GB19_enepW18 = 2.229444 if districtW18 == 10895
replace GB19_enepW18 = 2.200633 if districtW18 == 10896
replace GB19_enepW18 = 2.663633 if districtW18 == 10897
replace GB19_enepW18 = 2.274117 if districtW18 == 10898
replace GB19_enepW18 = 2.217012 if districtW18 == 10899
replace GB19_enepW18 = 2.031587 if districtW18 == 10900
replace GB19_enepW18 = 2.400526 if districtW18 == 10901
replace GB19_enepW18 = 2.184168 if districtW18 == 10902
replace GB19_enepW18 = 3.056094 if districtW18 == 10903
replace GB19_enepW18 = 3.216738 if districtW18 == 10904
replace GB19_enepW18 = 2.293473 if districtW18 == 10905
replace GB19_enepW18 = 2.545549 if districtW18 == 10906
replace GB19_enepW18 = 2.660927 if districtW18 == 10907
replace GB19_enepW18 = 2.67948 if districtW18 == 10908
replace GB19_enepW18 = 2.270591 if districtW18 == 10909
replace GB19_enepW18 = 2.208872 if districtW18 == 10910
replace GB19_enepW18 = 2.52931 if districtW18 == 10911
replace GB19_enepW18 = 2.558424 if districtW18 == 10912
replace GB19_enepW18 = 2.3025 if districtW18 == 10913
replace GB19_enepW18 = 2.337367 if districtW18 == 10914
replace GB19_enepW18 = 2.743548 if districtW18 == 10915
replace GB19_enepW18 = 2.40918 if districtW18 == 10916
replace GB19_enepW18 = 2.309724 if districtW18 == 10917
replace GB19_enepW18 = 2.335425 if districtW18 == 10918
replace GB19_enepW18 = 2.100488 if districtW18 == 10919
replace GB19_enepW18 = 2.811439 if districtW18 == 10920
replace GB19_enepW18 = 2.524503 if districtW18 == 10921
replace GB19_enepW18 = 3.334459 if districtW18 == 10922
replace GB19_enepW18 = 2.790205 if districtW18 == 10923
replace GB19_enepW18 = 2.155263 if districtW18 == 10924
replace GB19_enepW18 = 2.401042 if districtW18 == 10925
replace GB19_enepW18 = 2.504768 if districtW18 == 10926
replace GB19_enepW18 = 1.992082 if districtW18 == 10927
replace GB19_enepW18 = 2.411755 if districtW18 == 10928
replace GB19_enepW18 = 2.032266 if districtW18 == 10929
replace GB19_enepW18 = 2.307138 if districtW18 == 10930
replace GB19_enepW18 = 2.41312 if districtW18 == 10931
replace GB19_enepW18 = 2.502613 if districtW18 == 10932
replace GB19_enepW18 = 2.023032 if districtW18 == 10933
replace GB19_enepW18 = 2.4707 if districtW18 == 10934
replace GB19_enepW18 = 2.123849 if districtW18 == 10935
replace GB19_enepW18 = 2.365863 if districtW18 == 10936
replace GB19_enepW18 = 2.631235 if districtW18 == 10937
replace GB19_enepW18 = 2.385312 if districtW18 == 10938
replace GB19_enepW18 = 1.668406 if districtW18 == 10939
replace GB19_enepW18 = 2.12698 if districtW18 == 10940
replace GB19_enepW18 = 2.407304 if districtW18 == 10941
replace GB19_enepW18 = 2.228577 if districtW18 == 10942
replace GB19_enepW18 = 2.275031 if districtW18 == 10943
replace GB19_enepW18 = 3.44645 if districtW18 == 10944
replace GB19_enepW18 = 1.765135 if districtW18 == 10945
replace GB19_enepW18 = 2.254067 if districtW18 == 10946
replace GB19_enepW18 = 2.30112 if districtW18 == 10947
replace GB19_enepW18 = 2.289971 if districtW18 == 10948
replace GB19_enepW18 = 2.260601 if districtW18 == 10949
replace GB19_enepW18 = 2.205862 if districtW18 == 10950
replace GB19_enepW18 = 2.95619 if districtW18 == 10951
replace GB19_enepW18 = 1.935908 if districtW18 == 10952
replace GB19_enepW18 = 2.267911 if districtW18 == 10953
replace GB19_enepW18 = 2.332731 if districtW18 == 10954
replace GB19_enepW18 = 2.343118 if districtW18 == 10955
replace GB19_enepW18 = 2.631777 if districtW18 == 10956
replace GB19_enepW18 = 2.257505 if districtW18 == 10957
replace GB19_enepW18 = 2.524569 if districtW18 == 10958
replace GB19_enepW18 = 2.390392 if districtW18 == 10959
replace GB19_enepW18 = 2.423548 if districtW18 == 10960
replace GB19_enepW18 = 2.517851 if districtW18 == 10961
replace GB19_enepW18 = 2.762241 if districtW18 == 10962
replace GB19_enepW18 = 2.489774 if districtW18 == 10963
replace GB19_enepW18 = 2.399442 if districtW18 == 10964
replace GB19_enepW18 = 2.257246 if districtW18 == 10965
replace GB19_enepW18 = 2.025789 if districtW18 == 10966
replace GB19_enepW18 = 2.809599 if districtW18 == 10967
replace GB19_enepW18 = 2.414166 if districtW18 == 10968
replace GB19_enepW18 = 2.729144 if districtW18 == 10969
replace GB19_enepW18 = 2.765216 if districtW18 == 10970
replace GB19_enepW18 = 2.332523 if districtW18 == 10971
replace GB19_enepW18 = 2.511374 if districtW18 == 10972
replace GB19_enepW18 = 2.428548 if districtW18 == 10973
replace GB19_enepW18 = 1.990839 if districtW18 == 10974
replace GB19_enepW18 = 2.131709 if districtW18 == 10975
replace GB19_enepW18 = 2.172345 if districtW18 == 10976
replace GB19_enepW18 = 2.272064 if districtW18 == 10977
replace GB19_enepW18 = 2.60692 if districtW18 == 10978
replace GB19_enepW18 = 2.247453 if districtW18 == 10979
replace GB19_enepW18 = 2.424186 if districtW18 == 10980
replace GB19_enepW18 = 2.563542 if districtW18 == 10981
replace GB19_enepW18 = 3.104565 if districtW18 == 10982
replace GB19_enepW18 = 2.33801 if districtW18 == 10983
replace GB19_enepW18 = 2.614083 if districtW18 == 10984
replace GB19_enepW18 = 2.290291 if districtW18 == 10985
replace GB19_enepW18 = 2.002211 if districtW18 == 10986
replace GB19_enepW18 = 2.441679 if districtW18 == 10987
replace GB19_enepW18 = 2.389697 if districtW18 == 10988
replace GB19_enepW18 = 2.100649 if districtW18 == 10989
replace GB19_enepW18 = 2.414347 if districtW18 == 10990
replace GB19_enepW18 = 2.4086 if districtW18 == 10991
replace GB19_enepW18 = 2.109786 if districtW18 == 10992
replace GB19_enepW18 = 2.236945 if districtW18 == 10993
replace GB19_enepW18 = 2.187167 if districtW18 == 10994
replace GB19_enepW18 = 2.160862 if districtW18 == 10995
replace GB19_enepW18 = 2.356772 if districtW18 == 10996
replace GB19_enepW18 = 2.250113 if districtW18 == 10997
replace GB19_enepW18 = 2.637686 if districtW18 == 10998
replace GB19_enepW18 = 2.346686 if districtW18 == 10999
replace GB19_enepW18 = 2.349215 if districtW18 == 11000
replace GB19_enepW18 = 2.533637 if districtW18 == 11001
replace GB19_enepW18 = 1.672936 if districtW18 == 11002
replace GB19_enepW18 = 2.67381 if districtW18 == 11003
replace GB19_enepW18 = 2.462917 if districtW18 == 11004
replace GB19_enepW18 = 2.280283 if districtW18 == 11005
replace GB19_enepW18 = 2.548314 if districtW18 == 11006
replace GB19_enepW18 = 2.364026 if districtW18 == 11007
replace GB19_enepW18 = 2.561029 if districtW18 == 11008
replace GB19_enepW18 = 2.580095 if districtW18 == 11009
replace GB19_enepW18 = 2.084443 if districtW18 == 11010
replace GB19_enepW18 = 1.977895 if districtW18 == 11011
replace GB19_enepW18 = 2.422069 if districtW18 == 11012
replace GB19_enepW18 = 1.668706 if districtW18 == 11013
replace GB19_enepW18 = 2.843626 if districtW18 == 11014
replace GB19_enepW18 = 2.612827 if districtW18 == 11015
replace GB19_enepW18 = 2.322785 if districtW18 == 11016
replace GB19_enepW18 = 2.696621 if districtW18 == 11017
replace GB19_enepW18 = 2.528534 if districtW18 == 11018
replace GB19_enepW18 = 2.63214 if districtW18 == 11019
replace GB19_enepW18 = 3.205665 if districtW18 == 11020
replace GB19_enepW18 = 2.65775 if districtW18 == 11021
replace GB19_enepW18 = 2.153549 if districtW18 == 11022
replace GB19_enepW18 = 2.319406 if districtW18 == 11023
replace GB19_enepW18 = 2.507254 if districtW18 == 11024
replace GB19_enepW18 = 2.155181 if districtW18 == 11025
replace GB19_enepW18 = 2.26745 if districtW18 == 11026
replace GB19_enepW18 = 2.539671 if districtW18 == 11027
replace GB19_enepW18 = 3.160097 if districtW18 == 11028
replace GB19_enepW18 = 2.497088 if districtW18 == 11029
replace GB19_enepW18 = 2.40567 if districtW18 == 11030
replace GB19_enepW18 = 2.402276 if districtW18 == 11031
replace GB19_enepW18 = 1.90872 if districtW18 == 11032
replace GB19_enepW18 = 2.448091 if districtW18 == 11033
replace GB19_enepW18 = 2.057797 if districtW18 == 11034
replace GB19_enepW18 = 2.323328 if districtW18 == 11035
replace GB19_enepW18 = 2.527684 if districtW18 == 11036
replace GB19_enepW18 = 2.239742 if districtW18 == 11037
replace GB19_enepW18 = 2.387894 if districtW18 == 11038
replace GB19_enepW18 = 2.937077 if districtW18 == 11039
replace GB19_enepW18 = 2.921765 if districtW18 == 11040
replace GB19_enepW18 = 2.210355 if districtW18 == 11041
replace GB19_enepW18 = 2.422138 if districtW18 == 11042
replace GB19_enepW18 = 2.465245 if districtW18 == 11043
replace GB19_enepW18 = 2.455013 if districtW18 == 11044
replace GB19_enepW18 = 2.048267 if districtW18 == 11045
replace GB19_enepW18 = 2.390707 if districtW18 == 11046
replace GB19_enepW18 = 2.760797 if districtW18 == 11047
replace GB19_enepW18 = 2.506659 if districtW18 == 11048
replace GB19_enepW18 = 2.335 if districtW18 == 11049
replace GB19_enepW18 = 2.481299 if districtW18 == 11050
replace GB19_enepW18 = 2.314395 if districtW18 == 11051
replace GB19_enepW18 = 2.46744 if districtW18 == 11052
replace GB19_enepW18 = 2.49962 if districtW18 == 11053
replace GB19_enepW18 = 2.726044 if districtW18 == 11054
replace GB19_enepW18 = 2.459423 if districtW18 == 11055
replace GB19_enepW18 = 2.77186 if districtW18 == 11056
replace GB19_enepW18 = 2.258536 if districtW18 == 11057
replace GB19_enepW18 = 2.061222 if districtW18 == 11058
replace GB19_enepW18 = 2.602791 if districtW18 == 11059
replace GB19_enepW18 = 2.26206 if districtW18 == 11060
replace GB19_enepW18 = 2.553804 if districtW18 == 11061
replace GB19_enepW18 = 2.669393 if districtW18 == 11062
replace GB19_enepW18 = 2.237576 if districtW18 == 40001
replace GB19_enepW18 = 2.398503 if districtW18 == 40002
replace GB19_enepW18 = 2.4436 if districtW18 == 40003
replace GB19_enepW18 = 2.914082 if districtW18 == 40004
replace GB19_enepW18 = 3.26833 if districtW18 == 40005
replace GB19_enepW18 = 4.118884 if districtW18 == 40006
replace GB19_enepW18 = 2.619407 if districtW18 == 40007
replace GB19_enepW18 = 2.616206 if districtW18 == 40008
replace GB19_enepW18 = 3.250467 if districtW18 == 40009
replace GB19_enepW18 = 3.322552 if districtW18 == 40010
replace GB19_enepW18 = 3.907406 if districtW18 == 40011
replace GB19_enepW18 = 3.341931 if districtW18 == 40012
replace GB19_enepW18 = 2.743623 if districtW18 == 40013
replace GB19_enepW18 = 3.839926 if districtW18 == 40014
replace GB19_enepW18 = 4.20014 if districtW18 == 40015
replace GB19_enepW18 = 3.12309 if districtW18 == 40016
replace GB19_enepW18 = 3.724066 if districtW18 == 40017
replace GB19_enepW18 = 3.905175 if districtW18 == 40018
replace GB19_enepW18 = 2.803378 if districtW18 == 20001
replace GB19_enepW18 = 2.875067 if districtW18 == 20002
replace GB19_enepW18 = 2.956172 if districtW18 == 20003
replace GB19_enepW18 = 2.439405 if districtW18 == 20004
replace GB19_enepW18 = 2.93542 if districtW18 == 20005
replace GB19_enepW18 = 2.796583 if districtW18 == 20006
replace GB19_enepW18 = 2.387378 if districtW18 == 20007
replace GB19_enepW18 = 2.540197 if districtW18 == 20008
replace GB19_enepW18 = 3.286247 if districtW18 == 20009
replace GB19_enepW18 = 2.804746 if districtW18 == 20010
replace GB19_enepW18 = 2.749329 if districtW18 == 20011
replace GB19_enepW18 = 2.703964 if districtW18 == 20012
replace GB19_enepW18 = 2.692589 if districtW18 == 20013
replace GB19_enepW18 = 2.69716 if districtW18 == 20014
replace GB19_enepW18 = 2.684814 if districtW18 == 20015
replace GB19_enepW18 = 2.718467 if districtW18 == 20016
replace GB19_enepW18 = 3.257612 if districtW18 == 20017
replace GB19_enepW18 = 3.315993 if districtW18 == 20018
replace GB19_enepW18 = 3.160132 if districtW18 == 20019
replace GB19_enepW18 = 3.41146 if districtW18 == 20020
replace GB19_enepW18 = 2.88653 if districtW18 == 20021
replace GB19_enepW18 = 3.019795 if districtW18 == 20022
replace GB19_enepW18 = 3.475144 if districtW18 == 20023
replace GB19_enepW18 = 3.065245 if districtW18 == 20024
replace GB19_enepW18 = 3.144562 if districtW18 == 20025
replace GB19_enepW18 = 3.286851 if districtW18 == 20026
replace GB19_enepW18 = 2.987434 if districtW18 == 20027
replace GB19_enepW18 = 2.768979 if districtW18 == 20028
replace GB19_enepW18 = 2.745468 if districtW18 == 20029
replace GB19_enepW18 = 2.763849 if districtW18 == 20030
replace GB19_enepW18 = 2.97716 if districtW18 == 20031
replace GB19_enepW18 = 2.582916 if districtW18 == 20032
replace GB19_enepW18 = 2.824533 if districtW18 == 20033
replace GB19_enepW18 = 2.958673 if districtW18 == 20034
replace GB19_enepW18 = 2.747248 if districtW18 == 20035
replace GB19_enepW18 = 2.890392 if districtW18 == 20036
replace GB19_enepW18 = 2.72634 if districtW18 == 20037
replace GB19_enepW18 = 2.858925 if districtW18 == 20038
replace GB19_enepW18 = 3.022197 if districtW18 == 20039
replace GB19_enepW18 = 2.810323 if districtW18 == 20040
replace GB19_enepW18 = 3.616171 if districtW18 == 20041
replace GB19_enepW18 = 3.094719 if districtW18 == 20042
replace GB19_enepW18 = 3.371163 if districtW18 == 20043
replace GB19_enepW18 = 3.102626 if districtW18 == 20044
replace GB19_enepW18 = 3.195436 if districtW18 == 20045
replace GB19_enepW18 = 2.466022 if districtW18 == 20046
replace GB19_enepW18 = 2.877905 if districtW18 == 20047
replace GB19_enepW18 = 2.835748 if districtW18 == 20048
replace GB19_enepW18 = 2.735927 if districtW18 == 20049
replace GB19_enepW18 = 2.655375 if districtW18 == 20050
replace GB19_enepW18 = 3.00941 if districtW18 == 20051
replace GB19_enepW18 = 3.025947 if districtW18 == 20052
replace GB19_enepW18 = 2.83796 if districtW18 == 20053
replace GB19_enepW18 = 2.516508 if districtW18 == 20054
replace GB19_enepW18 = 3.045757 if districtW18 == 20055
replace GB19_enepW18 = 2.946178 if districtW18 == 20056
replace GB19_enepW18 = 2.607392 if districtW18 == 20057
replace GB19_enepW18 = 2.729239 if districtW18 == 20058
replace GB19_enepW18 = 2.858731 if districtW18 == 20059
replace GB19_enepW18 = 3.323154 if districtW18 == 30041
replace GB19_enepW18 = 2.703111 if districtW18 == 30042
replace GB19_enepW18 = 2.737456 if districtW18 == 30043
replace GB19_enepW18 = 2.741129 if districtW18 == 30044
replace GB19_enepW18 = 3.220429 if districtW18 == 30045
replace GB19_enepW18 = 2.610378 if districtW18 == 30046
replace GB19_enepW18 = 2.75196 if districtW18 == 30047
replace GB19_enepW18 = 2.777322 if districtW18 == 30048
replace GB19_enepW18 = 2.847367 if districtW18 == 30049
replace GB19_enepW18 = 2.279256 if districtW18 == 30050
replace GB19_enepW18 = 2.613542 if districtW18 == 30051
replace GB19_enepW18 = 2.810709 if districtW18 == 30052
replace GB19_enepW18 = 3.290047 if districtW18 == 30053
replace GB19_enepW18 = 2.590157 if districtW18 == 30054
replace GB19_enepW18 = 2.792667 if districtW18 == 30055
replace GB19_enepW18 = 2.70023 if districtW18 == 30056
replace GB19_enepW18 = 2.811688 if districtW18 == 30057
replace GB19_enepW18 = 2.627559 if districtW18 == 30058
replace GB19_enepW18 = 2.594195 if districtW18 == 30059
replace GB19_enepW18 = 2.547976 if districtW18 == 30060
replace GB19_enepW18 = 2.780941 if districtW18 == 30061
replace GB19_enepW18 = 2.654282 if districtW18 == 30062
replace GB19_enepW18 = 2.366531 if districtW18 == 30063
replace GB19_enepW18 = 3.987428 if districtW18 == 30064
replace GB19_enepW18 = 2.44833 if districtW18 == 30065
replace GB19_enepW18 = 2.472936 if districtW18 == 30066
replace GB19_enepW18 = 3.151858 if districtW18 == 30067
replace GB19_enepW18 = 2.378701 if districtW18 == 30068
replace GB19_enepW18 = 3.440978 if districtW18 == 30069
replace GB19_enepW18 = 2.999309 if districtW18 == 30070
replace GB19_enepW18 = 2.975081 if districtW18 == 30071
replace GB19_enepW18 = 3.071379 if districtW18 == 30072
replace GB19_enepW18 = 2.810082 if districtW18 == 30073
replace GB19_enepW18 = 2.94144 if districtW18 == 30074
replace GB19_enepW18 = 3.239469 if districtW18 == 30075
replace GB19_enepW18 = 3.148347 if districtW18 == 30076
replace GB19_enepW18 = 3.23778 if districtW18 == 30077
replace GB19_enepW18 = 2.275404 if districtW18 == 30078
replace GB19_enepW18 = 2.787835 if districtW18 == 30079
replace GB19_enepW18 = 2.599182 if districtW18 == 30080


**************************************************
** INDEPENDENT VARIABLES: 2015 GENERAL ELECTION **
**************************************************

* Party identification in wave 4

gen GB15_pidstatus_districtW4 = .

replace GB15_pidstatus_districtW4 = 9999 if partyIdW4 == . & partyIdSqueezeW4 == .
replace GB15_pidstatus_districtW4 = 9999 if partyIdW4 == 9999 & partyIdSqueezeW4 == 9999

replace GB15_pidstatus_districtW4 = 2 if partyIdW4 == 10 & partyIdSqueezeW4 == 10 & GB15_pidstatus_districtW4!=9999
replace GB15_pidstatus_districtW4 = 2 if partyIdW4 == 9999 & partyIdSqueezeW4 == 10 & GB15_pidstatus_districtW4!=9999

replace GB15_pidstatus_districtW4 = 3 if partyIdW4 == GB15_outcomeW4 & GB15_pidstatus_districtW4!=2 & GB15_pidstatus_districtW4!=9999
replace GB15_pidstatus_districtW4 = 3 if partyIdSqueezeW4 == GB15_outcomeW4 & GB15_pidstatus_districtW4!=2 & GB15_pidstatus_districtW4!=9999

replace GB15_pidstatus_districtW4 = 1 if partyIdW4!=GB15_outcomeW4 & partyIdW4!=. & GB15_pidstatus_districtW4!=2 & GB15_pidstatus_districtW4!=3 & GB15_pidstatus_districtW4!=9999
replace GB15_pidstatus_districtW4 = 1 if partyIdSqueezeW4!=GB15_outcomeW4 & partyIdSqueezeW4!=. & GB15_pidstatus_districtW4!=2 & GB15_pidstatus_districtW4!=3 & GB15_pidstatus_districtW4!=9999

replace GB15_pidstatus_districtW4 = . if GB15_pidstatus_districtW4 == 9999

label define pidstatus 1 "Loser PID" 2 "No PID" 3 "Winner PID"

label values GB15_pidstatus_districtW4 pidstatus

* Party identification scale in wave 4

gen GB15_pidscale_districtW4 = .

replace GB15_pidscale_districtW4 = 1 if GB15_pidstatus_districtW4 == 1 & partyIdStrengthW4 == 1 
replace GB15_pidscale_districtW4 = 2 if GB15_pidstatus_districtW4 == 1 & partyIdStrengthW4 == 2  
replace GB15_pidscale_districtW4 = 2 if GB15_pidstatus_districtW4 == 1 & partyIdStrengthW4 == 3
replace GB15_pidscale_districtW4 = 3 if GB15_pidstatus_districtW4 == 2
replace GB15_pidscale_districtW4 = 4 if GB15_pidstatus_districtW4 == 3 & partyIdStrengthW4 == 3
replace GB15_pidscale_districtW4 = 4 if GB15_pidstatus_districtW4 == 3 & partyIdStrengthW4 == 2
replace GB15_pidscale_districtW4 = 5 if GB15_pidstatus_districtW4 == 3 & partyIdStrengthW4 == 1

label define pidscale 1 "Strong loser PID" 2 "Moderate strong loser PID" 3 "No PID" 4 "Moderate winner PID" 5 "Strong winner PID"

label values GB15_pidscale_districtW4 pidscale

* Party identification in wave 5 (assuming R's wave 5 PID stayed the same as R's wave 4 PID)

gen GB15_pidstatus_districtW5 = GB15_pidstatus_districtW4

label values GB15_pidstatus_districtW5 pidstatus

* Party identification scale in wave 5 (assuming R's wave 5 PID and PID strength stayed the same as R's wave 4 PID and PID strength)

gen GB15_pidscale_districtW5 = GB15_pidscale_districtW4

label values GB15_pidscale_districtW5 pidscale

* Interest for election in wave 4

gen GB15_interestW4 = electionInterestW4

recode GB15_interestW4 (9999=.)

* Interest for election in wave 5

gen GB15_interestW5 = electionInterestW5

recode GB15_interestW5 (9999=.)

* Political news attentiveness in wave 4

gen GB15_tvW4 = infoSourceTVW4 // Attention paid to politics on TV per day

recode GB15_tvW4 (9999=.) // Recode "don't know" as missing data
recode GB15_tvW4 (1=0)
recode GB15_tvW4 (2=1)
recode GB15_tvW4 (3=2)
recode GB15_tvW4 (4=3)
recode GB15_tvW4 (5=4)

gen GB15_newspapersW4 = infoSourcePaperW4 // Attention paid to politics in newspapers per day

recode GB15_newspapersW4 (9999=.) // Recode "don't know" as missing data
recode GB15_newspapersW4 (1=0)
recode GB15_newspapersW4 (2=1)
recode GB15_newspapersW4 (3=2)
recode GB15_newspapersW4 (4=3)
recode GB15_newspapersW4 (5=4)

gen GB15_radioW4 = infoSourceRadioW4 // Attention paid to politics on radio per day

recode GB15_radioW4 (9999=.) // Recode "don't know" as missing data
recode GB15_radioW4 (1=0)
recode GB15_radioW4 (2=1)
recode GB15_radioW4 (3=2)
recode GB15_radioW4 (4=3)
recode GB15_radioW4 (5=4)

gen GB15_internetW4 = infoSourceInternetW4 // Attention paid to politics on internet per day

recode GB15_internetW4 (9999=.) // Recode "don't know" as missing data
recode GB15_internetW4 (1=0)
recode GB15_internetW4 (2=1)
recode GB15_internetW4 (3=2)
recode GB15_internetW4 (4=3)
recode GB15_internetW4 (5=4)

gen GB15_newsW4 = GB15_tvW4 + GB15_newspapersW4 + GB15_radioW4 + GB15_internetW4 // Political news attentiveness

* Political news attentiveness in wave 5

gen GB15_tvW5 = infoSourceTVW5 // Attention paid to politics on TV per day

recode GB15_tvW5 (9999=.) // Recode "don't know" as missing data
recode GB15_tvW5 (1=0)
recode GB15_tvW5 (2=1)
recode GB15_tvW5 (3=2)
recode GB15_tvW5 (4=3)
recode GB15_tvW5 (5=4)

gen GB15_newspapersW5 = infoSourcePaperW5 // Attention paid to politics in newspapers per day

recode GB15_newspapersW5 (9999=.) // Recode "don't know" as missing data
recode GB15_newspapersW5 (1=0)
recode GB15_newspapersW5 (2=1)
recode GB15_newspapersW5 (3=2)
recode GB15_newspapersW5 (4=3)
recode GB15_newspapersW5 (5=4)

gen GB15_radioW5 = infoSourceRadioW5 // Attention paid to politics on radio per day

recode GB15_radioW5 (9999=.) // Recode "don't know" as missing data
recode GB15_radioW5 (1=0)
recode GB15_radioW5 (2=1)
recode GB15_radioW5 (3=2)
recode GB15_radioW5 (4=3)
recode GB15_radioW5 (5=4)

gen GB15_internetW5 = infoSourceInternetW5 // Attention paid to politics on internet per day

recode GB15_internetW5 (9999=.) // Recode "don't know" as missing data
recode GB15_internetW5 (1=0)
recode GB15_internetW5 (2=1)
recode GB15_internetW5 (3=2)
recode GB15_internetW5 (4=3)
recode GB15_internetW5 (5=4)

gen GB15_newsW5 = GB15_tvW5 + GB15_newspapersW5 + GB15_radioW5 + GB15_internetW5 // Political news attentiveness

* Education in wave 4

gen GB15_educationW4 = edlevelW1_W6

* Education in wave 5

gen GB15_educationW5 = edlevelW1_W6

* Response date in wave 4

gen GB15_surveydateW4 = dofc(endtimeW4)

format %tdMon_DD,_CCYY GB15_surveydateW4

gen GB15_edate = "May 7, 2015"

generate GB15_electiondate = date(GB15_edate, "MDY")

format %tdMon_DD,_CCYY GB15_electiondate

gen GB15_timeW4 = GB15_electiondate - GB15_surveydateW4

* Response date in wave 5

gen GB15_surveydateW5 = dofc(endtimeW5)

format %tdMon_DD,_CCYY GB15_surveydateW5

gen GB15_timeW5 = GB15_electiondate - GB15_surveydateW5

* Age in wave 4

gen GB15_ageW4 = ageW7 - 1

* Age in wave 5

gen GB15_ageW5 = ageW7 - 1

* Gender 

gen male = gender

recode male (2=0)

* Political discussion in wave 4

gen GB15_discussionW4 = discussPolDaysW4

recode GB15_discussionW4 (9999=.)

gen GB15_discussionW4_3pts = 0 if GB15_discussionW4 < 2 & GB15_discussionW4!=.
replace GB15_discussionW4_3pts = 1 if GB15_discussionW4 >= 2 & GB15_discussionW4 < 4 & GB15_discussionW4!=.
replace GB15_discussionW4_3pts = 2 if GB15_discussionW4 >= 4 & GB15_discussionW4!=.

* Political discussion in wave 5

gen GB15_discussionW5 = discussPolDaysW5

recode GB15_discussionW5 (9999=.)

gen GB15_discussionW5_3pts = 0 if GB15_discussionW5 < 2 & GB15_discussionW5!=.
replace GB15_discussionW5_3pts = 1 if GB15_discussionW5 >= 2 & GB15_discussionW5 < 4 & GB15_discussionW5!=.
replace GB15_discussionW5_3pts = 2 if GB15_discussionW5 >= 4 & GB15_discussionW5!=.


**************************************************
** INDEPENDENT VARIABLES: 2017 GENERAL ELECTION **
**************************************************

* Party identification in wave 11

gen GB17_pidstatus_districtW11 = .

replace GB17_pidstatus_districtW11 = 9999 if partyIdW11 == . & partyIdSqueezeW11 == .
replace GB17_pidstatus_districtW11 = 9999 if partyIdW11 == 9999 & partyIdSqueezeW11 == 9999

replace GB17_pidstatus_districtW11 = 2 if partyIdW11 == 10 & partyIdSqueezeW11 == 10 & GB17_pidstatus_districtW11!=9999
replace GB17_pidstatus_districtW11 = 2 if partyIdW11 == 9999 & partyIdSqueezeW11 == 10 & GB17_pidstatus_districtW11!=9999

replace GB17_pidstatus_districtW11 = 3 if partyIdW11 == GB17_outcomeW11 & GB17_pidstatus_districtW11!=2 & GB17_pidstatus_districtW11!=9999
replace GB17_pidstatus_districtW11 = 3 if partyIdSqueezeW11 == GB17_outcomeW11 & GB17_pidstatus_districtW11!=2 & GB17_pidstatus_districtW11!=9999

replace GB17_pidstatus_districtW11 = 1 if partyIdW11!=GB17_outcomeW11 & partyIdW11!=. & GB17_pidstatus_districtW11!=2 & GB17_pidstatus_districtW11!=3 & GB17_pidstatus_districtW11!=9999
replace GB17_pidstatus_districtW11 = 1 if partyIdSqueezeW11!=GB17_outcomeW11 & partyIdSqueezeW11!=. & GB17_pidstatus_districtW11!=2 & GB17_pidstatus_districtW11!=3 & GB17_pidstatus_districtW11!=9999

replace GB17_pidstatus_districtW11 = . if GB17_pidstatus_districtW11 == 9999

label values GB17_pidstatus_districtW11 pidstatus

* Party identification scale in wave 11

gen GB17_pidscale_districtW11 = .

replace GB17_pidscale_districtW11 = 1 if GB17_pidstatus_districtW11 == 1 & partyIdStrengthW11 == 1
replace GB17_pidscale_districtW11 = 2 if GB17_pidstatus_districtW11 == 1 & partyIdStrengthW11 == 2
replace GB17_pidscale_districtW11 = 2 if GB17_pidstatus_districtW11 == 1 & partyIdStrengthW11 == 3
replace GB17_pidscale_districtW11 = 3 if GB17_pidstatus_districtW11 == 2
replace GB17_pidscale_districtW11 = 4 if GB17_pidstatus_districtW11 == 3 & partyIdStrengthW11 == 3
replace GB17_pidscale_districtW11 = 4 if GB17_pidstatus_districtW11 == 3 & partyIdStrengthW11 == 2
replace GB17_pidscale_districtW11 = 5 if GB17_pidstatus_districtW11 == 3 & partyIdStrengthW11 == 1
 
label values GB17_pidscale_districtW11 pidscale

* Party identification in wave 12 (assuming R's wave 5 PID stayed the same as R's wave 4 PID)

gen GB17_pidstatus_districtW12 = .

replace GB17_pidstatus_districtW12 = 9999 if partyIdW12 == . & partyIdSqueezeW12 == .
replace GB17_pidstatus_districtW12 = 9999 if partyIdW12 == 9999 & partyIdSqueezeW12 == 9999

replace GB17_pidstatus_districtW12 = 2 if partyIdW12 == 10 & partyIdSqueezeW12 == 10 & GB17_pidstatus_districtW12!=9999
replace GB17_pidstatus_districtW12 = 2 if partyIdW12 == 9999 & partyIdSqueezeW12 == 10 & GB17_pidstatus_districtW12!=9999

replace GB17_pidstatus_districtW12 = 3 if partyIdW12 == GB17_outcomeW12 & GB17_pidstatus_districtW12!=2 & GB17_pidstatus_districtW12!=9999
replace GB17_pidstatus_districtW12 = 3 if partyIdSqueezeW12 == GB17_outcomeW12 & GB17_pidstatus_districtW12!=2 & GB17_pidstatus_districtW12!=9999

replace GB17_pidstatus_districtW12 = 1 if partyIdW12!=GB17_outcomeW12 & partyIdW12!=. & GB17_pidstatus_districtW12!=2 & GB17_pidstatus_districtW12!=3 & GB17_pidstatus_districtW12!=9999
replace GB17_pidstatus_districtW12 = 1 if partyIdSqueezeW12!=GB17_outcomeW12 & partyIdSqueezeW12!=. & GB17_pidstatus_districtW12!=2 & GB17_pidstatus_districtW12!=3 & GB17_pidstatus_districtW12!=9999

replace GB17_pidstatus_districtW12 = . if GB17_pidstatus_districtW12 == 9999

label values GB17_pidstatus_districtW12 pidstatus

* Party identification scale in wave 12 (assuming R's wave 5 PID and PID strength stayed the same as R's wave 4 PID and PID strength)

gen GB17_pidscale_districtW12 = .

replace GB17_pidscale_districtW12 = 1 if GB17_pidstatus_districtW12 == 1 & partyIdStrengthW12 == 1
replace GB17_pidscale_districtW12 = 2 if GB17_pidstatus_districtW12 == 1 & partyIdStrengthW12 == 2
replace GB17_pidscale_districtW12 = 2 if GB17_pidstatus_districtW12 == 1 & partyIdStrengthW12 == 3
replace GB17_pidscale_districtW12 = 3 if GB17_pidstatus_districtW12 == 2
replace GB17_pidscale_districtW12 = 4 if GB17_pidstatus_districtW12 == 3 & partyIdStrengthW12 == 3
replace GB17_pidscale_districtW12 = 4 if GB17_pidstatus_districtW12 == 3 & partyIdStrengthW12 == 2
replace GB17_pidscale_districtW12 = 5 if GB17_pidstatus_districtW12 == 3 & partyIdStrengthW12 == 1

label values GB17_pidscale_districtW12 pidscale

* Interest for election in wave 11

gen GB17_interestW11 = electionInterestW11

recode GB17_interestW11 (9999=.)

* Interest for election in wave 12

gen GB17_interestW12 = electionInterestW12

recode GB17_interestW12 (9999=.)

* Political news attentiveness in wave 12

gen GB17_tvW12 = infoSourceTVW12 // Attention paid to politics on TV per day

recode GB17_tvW12 (9999=.) // Recode "don't know" as missing data
recode GB17_tvW12 (1=0)
recode GB17_tvW12 (2=1)
recode GB17_tvW12 (3=2)
recode GB17_tvW12 (4=3)
recode GB17_tvW12 (5=4)

gen GB17_newspapersW12 = infoSourcePaperW12 // Attention paid to politics in newspapers per day

recode GB17_newspapersW12 (9999=.) // Recode "don't know" as missing data
recode GB17_newspapersW12 (1=0)
recode GB17_newspapersW12 (2=1)
recode GB17_newspapersW12 (3=2)
recode GB17_newspapersW12 (4=3)
recode GB17_newspapersW12 (5=4)

gen GB17_radioW12 = infoSourceRadioW12 // Attention paid to politics on radio per day

recode GB17_radioW12 (9999=.) // Recode "don't know" as missing data
recode GB17_radioW12 (1=0)
recode GB17_radioW12 (2=1)
recode GB17_radioW12 (3=2)
recode GB17_radioW12 (4=3)
recode GB17_radioW12 (5=4)

gen GB17_internetW12 = infoSourceInternetW12 // Attention paid to politics on internet per day

recode GB17_internetW12 (9999=.) // Recode "don't know" as missing data
recode GB17_internetW12 (1=0)
recode GB17_internetW12 (2=1)
recode GB17_internetW12 (3=2)
recode GB17_internetW12 (4=3)
recode GB17_internetW12 (5=4)

gen GB17_newsW12 = GB17_tvW12 + GB17_newspapersW12 + GB17_radioW12 + GB17_internetW12 // Political news attentiveness

* Education in wave 11

gen GB17_educationW11 = edlevelW11

* Education in wave 12

gen GB17_educationW12 = edlevelW12

* Response date in wave 11

gen GB17_surveydateW11 = dofc(endtimeW11)

format %tdMon_DD,_CCYY GB17_surveydateW11

gen GB17_edate = "June 8, 2017"

generate GB17_electiondate = date(GB17_edate, "MDY")

format %tdMon_DD,_CCYY GB17_electiondate

gen GB17_timeW11 = GB17_electiondate - GB17_surveydateW11

* Response date in wave 12

gen GB17_surveydateW12 = dofc(endtimeW12)

format %tdMon_DD,_CCYY GB17_surveydateW12

gen GB17_timeW12 = GB17_electiondate - GB17_surveydateW12

* Age in wave 11

gen GB17_ageW11 = ageW11

replace GB17_ageW11 = . if GB17_ageW11 < 17

* Age in wave 12

gen GB17_ageW12 = ageW12

replace GB17_ageW12 = . if GB17_ageW12 < 17

* Polling stations close at 10.00pm on election day - Correct answer (true) = 1, Incorrect answer = 0

gen GB17_stationW111W12 = knowf2f1W11W12W14 // Polling stations closing time

replace GB17_stationW111W12 = 0 if GB17_stationW111W12!=1 & GB17_stationW111W12!=. // Incorrect answer
replace GB17_stationW111W12 = 1 if GB17_stationW111W12 == 1 // Correct answer

* No-one may stand for parliament unless they pay a deposit - Correct answer (true) = 1, Incorrect answer = 0

gen GB17_depositW111W12 = knowf2f2W11W12W14 // Pay deposit

replace GB17_depositW111W12 = 0 if GB17_depositW111W12!=1 & GB17_depositW111W12!=. // Incorrect answer
replace GB17_depositW111W12 = 1 if GB17_depositW111W12 == 1 // Correct answer

* Only taxpayers are allowed to vote in a general election - Correct answer (false) = 1, Incorrect answer = 0

gen GB17_taxpayersW111W12 = knowf2f3W11W12W14 // Polling stations closing time

replace GB17_taxpayersW111W12 = 88 if GB17_taxpayersW111W12 == 0 // Correct answer
replace GB17_taxpayersW111W12 = 0 if GB17_taxpayersW111W12!=88 & GB17_taxpayersW111W12!=. // Incorrect answer
replace GB17_taxpayersW111W12 = 1 if GB17_taxpayersW111W12 == 88 // Correct answer

* The Liberal Democrats favour a system of proportional representation for Westminster elections - Correct answer (true) = 1, Incorrect answer = 0

gen GB17_prW111W12 = knowf2f4W11W12W14 // Proportional representation

replace GB17_prW111W12 = 0 if GB17_prW111W12!=1 & GB17_prW111W12!=. // Incorrect answer
replace GB17_prW111W12 = 1 if GB17_prW111W12 == 1 // Correct answer

* MPs from different parties are on parliamentary committees  - Correct answer (true) = 1, Incorrect answer = 0

gen GB17_committeesW111W12 = knowf2f5W11W12W14 // Parliamentary committees

replace GB17_committeesW111W12 = 0 if GB17_committeesW111W12!=1 & GB17_committeesW111W12!=. // Incorrect answer
replace GB17_committeesW111W12 = 1 if GB17_committeesW111W12 == 1 // Correct answer

* The number of members of parliament is about 100 - Correct answer (false) = 1, Incorrect answer = 0

gen GB17_membersW111W12 = knowf2f6W11W12W14 // Members of parliament

replace GB17_membersW111W12 = 88 if GB17_membersW111W12 == 0 // Correct answer
replace GB17_membersW111W12 = 0 if GB17_membersW111W12!=88 & GB17_membersW111W12!=. // Incorrect answer
replace GB17_membersW111W12 = 1 if GB17_membersW111W12 == 88 // Correct answer

* Political knowledge index in waves 11 and 12

gen GB17_knowledgeW11W12 = GB17_stationW111W12 + GB17_depositW111W12 + GB17_taxpayersW111W12 + GB17_prW111W12 + GB17_committeesW111W12 + GB17_membersW111W12

* Political discussion in wave 11

gen GB17_discussionW11 = discussPolDaysW11

recode GB17_discussionW11 (9999=.)

gen GB17_discussionW11_3pts = 0 if GB17_discussionW11 < 2 & GB17_discussionW11!=.
replace GB17_discussionW11_3pts = 1 if GB17_discussionW11 >= 2 & GB17_discussionW11 < 4 & GB17_discussionW11!=.
replace GB17_discussionW11_3pts = 2 if GB17_discussionW11 >= 4 & GB17_discussionW11!=.

* Political discussion in wave 12

gen GB17_discussionW12 = discussPolDaysW12

recode GB17_discussionW12 (9999=.) (9999=.)

gen GB17_discussionW12_3pts = 0 if GB17_discussionW12 < 2 & GB17_discussionW12!=.
replace GB17_discussionW12_3pts = 1 if GB17_discussionW12 >= 2 & GB17_discussionW12 < 4 & GB17_discussionW12!=.
replace GB17_discussionW12_3pts = 2 if GB17_discussionW12 >= 4 & GB17_discussionW12!=.

* Political disagreement in wave 11

gen GB17_agreementW11 = agreePartyW11

recode GB17_agreementW11 (997=.)
recode GB17_agreementW11 (9999=.) 

gen GB17_disagreementW11 = 100 - GB17_agreementW11

gen GB17_disagreementW11_3pts = 0 if GB17_disagreementW11 >= 0 & GB17_disagreementW11 < 25 & GB17_disagreementW11!=.
replace GB17_disagreementW11_3pts = 1 if GB17_disagreementW11 > 24 & GB17_disagreementW11 < 50 & GB17_disagreementW11!=.
replace GB17_disagreementW11_3pts = 2 if GB17_disagreementW11 > 49 & GB17_disagreementW11!=.

* Political disagreement in wave 12

gen GB17_agreementW12 = partyAgree2W12

recode GB17_agreementW12 (997=.)
recode GB17_agreementW12 (9999=.)

gen GB17_disagreementW12 = 100 - GB17_agreementW12

gen GB17_disagreementW12_3pts = 0 if GB17_disagreementW12 >= 0 & GB17_disagreementW12 < 25 & GB17_disagreementW12!=.
replace GB17_disagreementW12_3pts = 0 if GB17_disagreementW12 > 24 & GB17_disagreementW12 < 50 & GB17_disagreementW12!=.
replace GB17_disagreementW12_3pts = 0 if GB17_disagreementW12 > 49 & GB17_disagreementW12!=.


**************************************************
** INDEPENDENT VARIABLES: 2019 GENERAL ELECTION **
**************************************************

* Party identification in wave 17

gen GB19_pidstatus_districtW17 = .

replace GB19_pidstatus_districtW17 = 9999 if partyIdW17 == . & partyIdSqueezeW17 == .
replace GB19_pidstatus_districtW17 = 9999 if partyIdW17 == 9999 & partyIdSqueezeW17 == 9999

replace GB19_pidstatus_districtW17 = 2 if partyIdW17 == 10 & partyIdSqueezeW17 == 10 & GB19_pidstatus_districtW17!=9999
replace GB19_pidstatus_districtW17 = 2 if partyIdW17 == 9999 & partyIdSqueezeW17 == 10 & GB19_pidstatus_districtW17!=9999

replace GB19_pidstatus_districtW17 = 3 if partyIdW17 == GB19_outcomeW17 & GB19_pidstatus_districtW17!=2 & GB19_pidstatus_districtW17!=9999
replace GB19_pidstatus_districtW17 = 3 if partyIdSqueezeW17 == GB19_outcomeW17 & GB19_pidstatus_districtW17!=2 & GB19_pidstatus_districtW17!=9999

replace GB19_pidstatus_districtW17 = 1 if partyIdW17!=GB19_outcomeW17 & partyIdW17!=. & GB19_pidstatus_districtW17!=2 & GB19_pidstatus_districtW17!=3 & GB19_pidstatus_districtW17!=9999
replace GB19_pidstatus_districtW17 = 1 if partyIdSqueezeW17!=GB19_outcomeW17 & partyIdSqueezeW17!=. & GB19_pidstatus_districtW17!=2 & GB19_pidstatus_districtW17!=3 & GB19_pidstatus_districtW17!=9999

replace GB19_pidstatus_districtW17 = . if GB19_pidstatus_districtW17 == 9999

label values GB19_pidstatus_districtW17 pidstatus

* Party identification scale in wave 17

gen GB19_pidscale_districtW17 = .

replace GB19_pidscale_districtW17 = 1 if GB19_pidstatus_districtW17 == 1 & partyIdStrengthW17 == 1
replace GB19_pidscale_districtW17 = 2 if GB19_pidstatus_districtW17 == 1 & partyIdStrengthW17 == 2
replace GB19_pidscale_districtW17 = 2 if GB19_pidstatus_districtW17 == 1 & partyIdStrengthW17 == 3
replace GB19_pidscale_districtW17 = 3 if GB19_pidstatus_districtW17 == 2
replace GB19_pidscale_districtW17 = 4 if GB19_pidstatus_districtW17 == 3 & partyIdStrengthW17 == 3
replace GB19_pidscale_districtW17 = 4 if GB19_pidstatus_districtW17 == 3 & partyIdStrengthW17 == 2
replace GB19_pidscale_districtW17 = 5 if GB19_pidstatus_districtW17 == 3 & partyIdStrengthW17 == 1

label values GB19_pidscale_districtW17 pidscale

* Party identification in wave 18

gen GB19_pidstatus_districtW18 = .

replace GB19_pidstatus_districtW18 = 9999 if partyIdW18 == . & partyIdSqueezeW18 == .
replace GB19_pidstatus_districtW18 = 9999 if partyIdW18 == 9999 & partyIdSqueezeW18 == 9999

replace GB19_pidstatus_districtW18 = 2 if partyIdW18 == 10 & partyIdSqueezeW18 == 10 & GB19_pidstatus_districtW18!=9999
replace GB19_pidstatus_districtW18 = 2 if partyIdW18 == 9999 & partyIdSqueezeW18 == 10 & GB19_pidstatus_districtW18!=9999

replace GB19_pidstatus_districtW18 = 3 if partyIdW18 == GB19_outcomeW18 & GB19_pidstatus_districtW18!=2 & GB19_pidstatus_districtW18!=9999
replace GB19_pidstatus_districtW18 = 3 if partyIdSqueezeW18 == GB19_outcomeW18 & GB19_pidstatus_districtW18!=2 & GB19_pidstatus_districtW18!=9999

replace GB19_pidstatus_districtW18 = 1 if partyIdW18!=GB19_outcomeW18 & partyIdW18!=. & GB19_pidstatus_districtW18!=2 & GB19_pidstatus_districtW18!=3 & GB19_pidstatus_districtW18!=9999
replace GB19_pidstatus_districtW18 = 1 if partyIdSqueezeW18!=GB19_outcomeW18 & partyIdSqueezeW18!=. & GB19_pidstatus_districtW18!=2 & GB19_pidstatus_districtW18!=3 & GB19_pidstatus_districtW18!=9999

replace GB19_pidstatus_districtW18 = . if GB19_pidstatus_districtW18 == 9999

label values GB19_pidstatus_districtW18 pidstatus

* Party identification scale in wave 18

gen GB19_pidscale_districtW18 = .

replace GB19_pidscale_districtW18 = 1 if GB19_pidstatus_districtW18 == 1 & partyIdStrengthW18 == 1
replace GB19_pidscale_districtW18 = 2 if GB19_pidstatus_districtW18 == 1 & partyIdStrengthW18 == 2
replace GB19_pidscale_districtW18 = 2 if GB19_pidstatus_districtW18 == 1 & partyIdStrengthW18 == 3
replace GB19_pidscale_districtW18 = 3 if GB19_pidstatus_districtW18 == 2
replace GB19_pidscale_districtW18 = 4 if GB19_pidstatus_districtW18 == 3 & partyIdStrengthW18 == 3
replace GB19_pidscale_districtW18 = 4 if GB19_pidstatus_districtW18 == 3 & partyIdStrengthW18 == 2
replace GB19_pidscale_districtW18 = 5 if GB19_pidstatus_districtW18 == 3 & partyIdStrengthW18 == 1

label values GB19_pidscale_districtW18 pidscale

* Interest for election in wave 17

gen GB19_interestW17 = electionInterestW17

recode GB19_interestW17 (9999=.)

* Interest for election in wave 18

gen GB19_interestW18 = electionInterestW18

recode GB19_interestW18 (9999=.)

* Political news attentiveness in wave 17

gen GB19_tvW17 = infoSourceTVW17 // Attention paid to politics on TV per day

recode GB19_tvW17 (9999=.) // Recode "don't know" as missing data
recode GB19_tvW17 (1=0)
recode GB19_tvW17 (2=1)
recode GB19_tvW17 (3=2)
recode GB19_tvW17 (4=3)
recode GB19_tvW17 (5=4)

gen GB19_newspapersW17 = infoSourcePaperW17 // Attention paid to politics in newspapers per day

recode GB19_newspapersW17 (9999=.) // Recode "don't know" as missing data
recode GB19_newspapersW17 (1=0)
recode GB19_newspapersW17 (2=1)
recode GB19_newspapersW17 (3=2)
recode GB19_newspapersW17 (4=3)
recode GB19_newspapersW17 (5=4)

gen GB19_radioW17 = infoSourceRadioW17 // Attention paid to politics on radio per day

recode GB19_radioW17 (9999=.) // Recode "don't know" as missing data
recode GB19_radioW17 (1=0)
recode GB19_radioW17 (2=1)
recode GB19_radioW17 (3=2)
recode GB19_radioW17 (4=3)
recode GB19_radioW17 (5=4)

gen GB19_internetW17 = infoSourceInternetW17 // Attention paid to politics on internet per day

recode GB19_internetW17 (9999=.) // Recode "don't know" as missing data
recode GB19_internetW17 (1=0)
recode GB19_internetW17 (2=1)
recode GB19_internetW17 (3=2)
recode GB19_internetW17 (4=3)
recode GB19_internetW17 (5=4)

gen GB19_newsW17 = GB19_tvW17 + GB19_newspapersW17 + GB19_radioW17 + GB19_internetW17 // Political news attentiveness

* Political news attentiveness in wave 18

gen GB19_tvW18 = infoSourceTVW18 // Attention paid to politics on TV per day

recode GB19_tvW18 (9999=.) // Recode "don't know" as missing data
recode GB19_tvW18 (1=0)
recode GB19_tvW18 (2=1)
recode GB19_tvW18 (3=2)
recode GB19_tvW18 (4=3)
recode GB19_tvW18 (5=4)

gen GB19_newspapersW18 = infoSourcePaperW18 // Attention paid to politics in newspapers per day

recode GB19_newspapersW18 (9999=.) // Recode "don't know" as missing data
recode GB19_newspapersW18 (1=0)
recode GB19_newspapersW18 (2=1)
recode GB19_newspapersW18 (3=2)
recode GB19_newspapersW18 (4=3)
recode GB19_newspapersW18 (5=4)

gen GB19_radioW18 = infoSourceRadioW18 // Attention paid to politics on radio per day

recode GB19_radioW18 (9999=.) // Recode "don't know" as missing data
recode GB19_radioW18 (1=0)
recode GB19_radioW18 (2=1)
recode GB19_radioW18 (3=2)
recode GB19_radioW18 (4=3)
recode GB19_radioW18 (5=4)

gen GB19_internetW18 = infoSourceInternetW18 // Attention paid to politics on internet per day

recode GB19_internetW18 (9999=.) // Recode "don't know" as missing data
recode GB19_internetW18 (1=0)
recode GB19_internetW18 (2=1)
recode GB19_internetW18 (3=2)
recode GB19_internetW18 (4=3)
recode GB19_internetW18 (5=4)

gen GB19_newsW18 = GB19_tvW18 + GB19_newspapersW18 + GB19_radioW18 + GB19_internetW18 // Political news attentiveness

* Education in wave 17

gen GB19_educationW17 = edlevelW17

* Education in wave 18

gen GB19_educationW18 = edlevelW18

* Response date in wave 17

gen GB19_surveydateW17 = dofc(endtimeW17)

format %tdMon_DD,_CCYY GB19_surveydateW17

gen GB19_edate = "December 12, 2019"

generate GB19_electiondate = date(GB19_edate, "MDY")

format %tdMon_DD,_CCYY GB19_electiondate

gen GB19_timeW17 = GB19_electiondate - GB19_surveydateW17

* Response date in wave 18

gen GB19_surveydateW18 = dofc(endtimeW18)

format %tdMon_DD,_CCYY GB19_surveydateW18

gen GB19_timeW18 = GB19_electiondate - GB19_surveydateW18

* Age in wave 17

gen GB19_ageW17 = ageW17

replace GB19_ageW17 = . if GB19_ageW17 < 17

* Age in wave 18

gen GB19_ageW18 = ageW18

replace GB19_ageW18 = . if GB19_ageW18 < 17

* Polling stations close at 10.00pm on election day - Correct answer (true) = 1, Incorrect answer = 0

gen GB19_stationW17 = knowf2f1W17 // Polling stations closing time

replace GB19_stationW17 = 0 if GB19_stationW17!=1 & GB19_stationW17!=. // Incorrect answer
replace GB19_stationW17 = 1 if GB19_stationW17 == 1 // Correct answer

* No-one may stand for parliament unless they pay a deposit - Correct answer (true) = 1, Incorrect answer = 0

gen GB19_depositW17 = knowf2f2W17 // Pay deposit

replace GB19_depositW17 = 0 if GB19_depositW17!=1 & GB19_depositW17!=. // Incorrect answer
replace GB19_depositW17 = 1 if GB19_depositW17 == 1 // Correct answer

* Only taxpayers are allowed to vote in a general election - Correct answer (false) = 1, Incorrect answer = 0

gen GB19_taxpayersW17 = knowf2f3W17 // Polling stations closing time

replace GB19_taxpayersW17 = 88 if GB19_taxpayersW17 == 0 // Correct answer
replace GB19_taxpayersW17 = 0 if GB19_taxpayersW17!=88 & GB19_taxpayersW17!=. // Incorrect answer
replace GB19_taxpayersW17 = 1 if GB19_taxpayersW17 == 88 // Correct answer

* The Liberal Democrats favour a system of proportional representation for Westminster elections - Correct answer (true) = 1, Incorrect answer = 0

gen GB19_prW17 = knowf2f4W17 // Proportional representation

replace GB19_prW17 = 0 if GB19_prW17!=1 & GB19_prW17!=. // Incorrect answer
replace GB19_prW17 = 1 if GB19_prW17 == 1 // Correct answer

* MPs from different parties are on parliamentary committees  - Correct answer (true) = 1, Incorrect answer = 0

gen GB19_committeesW17 = knowf2f5W17 // Parliamentary committees

replace GB19_committeesW17 = 0 if GB19_committeesW17!=1 & GB19_committeesW17!=. // Incorrect answer
replace GB19_committeesW17 = 1 if GB19_committeesW17 == 1 // Correct answer

* The number of members of parliament is about 100 - Correct answer (false) = 1, Incorrect answer = 0

gen GB19_membersW17 = knowf2f6W17 // Members of parliament

replace GB19_membersW17 = 88 if GB19_membersW17 == 0 // Correct answer
replace GB19_membersW17 = 0 if GB19_membersW17!=88 & GB19_membersW17!=. // Incorrect answer
replace GB19_membersW17 = 1 if GB19_membersW17 == 88 // Correct answer

* Political knowledge index in wave 17

gen GB19_knowledgeW17 = GB19_stationW17 + GB19_depositW17 + GB19_taxpayersW17 + GB19_prW17 + GB19_committeesW17 + GB19_membersW17

* Political discussion in wave 17

gen GB19_discussionW17 = discussPolDaysW17

recode GB19_discussionW17 (9999=.)

gen GB19_discussionW17_3pts = 0 if GB19_discussionW17 < 2 & GB19_discussionW17!=.
replace GB19_discussionW17_3pts = 1 if GB19_discussionW17 >= 2 & GB19_discussionW17 < 4 & GB19_discussionW17!=.
replace GB19_discussionW17_3pts = 2 if GB19_discussionW17 >= 4 & GB19_discussionW17!=.

* Political discussion in wave 18

gen GB19_discussionW18 = discussPolDaysW18

recode GB19_discussionW18 (9999=.)

gen GB19_discussionW18_3pts = 0 if GB19_discussionW18 < 2 & GB19_discussionW18!=.
replace GB19_discussionW18_3pts = 1 if GB19_discussionW18 >= 2 & GB19_discussionW18 < 4 & GB19_discussionW18!=.
replace GB19_discussionW18_3pts = 2 if GB19_discussionW18 >= 4 & GB19_discussionW18!=.

* Political disagreement in wave 17

gen GB19_agreementW17 = agreePartyW17

recode GB19_agreementW17 (997=.)
recode GB19_agreementW17 (9999=.)

gen GB19_disagreementW17 = 100 - GB19_agreementW17

gen GB19_disagreementW17_3pts = 0 if GB19_disagreementW17 >= 0 & GB19_disagreementW17 < 25 & GB19_disagreementW17!=.
replace GB19_disagreementW17_3pts = 1 if GB19_disagreementW17 > 24 & GB19_disagreementW17 < 50 & GB19_disagreementW17!=.
replace GB19_disagreementW17_3pts = 2 if GB19_disagreementW17 > 49 & GB19_disagreementW17!=.

* Political disagreement in wave 18

gen GB19_agreementW18 = agreePartyW18

recode GB19_agreementW18 (997=.)
recode GB19_agreementW18 (9999=.)

gen GB19_disagreementW18 = 100 - GB19_agreementW18

gen GB19_disagreementW18_3pts = 0 if GB19_disagreementW18 >= 0 & GB19_disagreementW18 < 25 & GB19_disagreementW18!=.
replace GB19_disagreementW18_3pts = 1 if GB19_disagreementW18 > 24 & GB19_disagreementW18 < 50 & GB19_disagreementW18!=.
replace GB19_disagreementW18_3pts = 2 if GB19_disagreementW18 > 49 & GB19_disagreementW18!=.


*****************************************************************
** DISTRICT-LEVEL EXPECTATIONS: 2015 GENERAL ELECTION (WAVE 4) **
*****************************************************************

* Generate winning probability variable (PC in Wales only, SNP in Scotland only)

gen GB15_con_chanceW4 = winConstituencyConW4 
gen GB15_lab_chanceW4 = winConstituencyLabW4 
gen GB15_ld_chanceW4 = winConstituencyLDW4 
gen GB15_ukip_chanceW4 = winConstituencyUKIPW4 
gen GB15_green_chanceW4 = winConstituencyGreenW4 
gen GB15_snp_chanceW4 = winConstituencySNPW4 
gen GB15_pc_chanceW4 = winConstituencyPCW4 

recode GB15_con_chanceW4 GB15_lab_chanceW4 GB15_ld_chanceW4 GB15_ukip_chanceW4 GB15_green_chanceW4 GB15_snp_chanceW4 GB15_pc_chanceW4 (9999=.) // Recode "not sure" as missing data

gen GB15_complete_englandW4 = 1 if GB15_con_chanceW4!=. & GB15_lab_chanceW4!=. & GB15_ld_chanceW4!=. & GB15_ukip_chanceW4!=. & GB15_green_chanceW4!=. & wave4 == 1 & countryW4 == 1 // If the respondent gave an expectation score to each party candidate, treat his/her answers as complete (England respondents)

gen GB15_complete_scotlandW4 = 1 if GB15_con_chanceW4!=. & GB15_lab_chanceW4!=. & GB15_ld_chanceW4!=. & GB15_ukip_chanceW4!=. & GB15_green_chanceW4!=. & GB15_snp_chanceW4!=. & wave4 == 1 & countryW4 == 2 // If the respondent gave an expectation score to each party candidate, treat his/her answers as complete (Scotland respondents)

gen GB15_complete_walesW4 = 1 if GB15_con_chanceW4!=. & GB15_lab_chanceW4!=. & GB15_ld_chanceW4!=. & GB15_ukip_chanceW4!=. & GB15_green_chanceW4!=. & GB15_pc_chanceW4!=. & wave4 == 1 & countryW4 == 3 // If the respondent gave an expectation score to each party candidate, treat his/her answers as complete (Wales respondents)

gen GB15_completeW4 = max(GB15_complete_englandW4,GB15_complete_walesW4,GB15_complete_scotlandW4)

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (England)

gen GB15_con_englandW4 = 1 if GB15_con_chanceW4 >= GB15_lab_chanceW4 & GB15_con_chanceW4 >= GB15_ld_chanceW4 & GB15_con_chanceW4 >= GB15_ukip_chanceW4 & GB15_con_chanceW4 >= GB15_green_chanceW4 & countryW4 == 1 & GB15_complete_englandW4 == 1 & wave4 == 1

gen GB15_lab_englandW4 = 1 if GB15_lab_chanceW4 >= GB15_con_chanceW4 & GB15_lab_chanceW4 >= GB15_ld_chanceW4 & GB15_lab_chanceW4 >= GB15_ukip_chanceW4 & GB15_lab_chanceW4 >= GB15_green_chanceW4 & countryW4 == 1 & GB15_complete_englandW4 == 1 & wave4 == 1

gen GB15_ld_englandW4 = 1 if GB15_ld_chanceW4 >= GB15_con_chanceW4 & GB15_ld_chanceW4 >= GB15_lab_chanceW4 & GB15_ld_chanceW4 >= GB15_ukip_chanceW4 & GB15_ld_chanceW4 >= GB15_green_chanceW4 & countryW4 == 1 & GB15_complete_englandW4 == 1 & wave4 == 1

gen GB15_ukip_englandW4 = 1 if GB15_ukip_chanceW4 >= GB15_con_chanceW4 & GB15_ukip_chanceW4 >= GB15_lab_chanceW4 & GB15_ukip_chanceW4 >= GB15_ld_chanceW4 & GB15_ukip_chanceW4 >= GB15_green_chanceW4 & countryW4 == 1 & GB15_complete_englandW4 == 1 & wave4 == 1

gen GB15_green_englandW4 = 1 if GB15_green_chanceW4 >= GB15_con_chanceW4 & GB15_green_chanceW4 >= GB15_lab_chanceW4 & GB15_green_chanceW4 >= GB15_ld_chanceW4 & GB15_green_chanceW4 >= GB15_ukip_chanceW4 & countryW4 == 1 & GB15_complete_englandW4 == 1 & wave4 == 1

gen GB15_oth_englandW4 = 1 if GB15_con_chanceW4 == 0 & GB15_lab_chanceW4 == 0 & GB15_ld_chanceW4 == 0 & GB15_ukip_chanceW4 == 0 & countryW4 == 1 & GB15_complete_englandW4 == 1 & wave4 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Scotland)

gen GB15_con_scotlandW4 = 1 if GB15_con_chanceW4 >= GB15_lab_chanceW4 & GB15_con_chanceW4 >= GB15_ld_chanceW4 & GB15_con_chanceW4 >= GB15_ukip_chanceW4 & GB15_con_chanceW4 >= GB15_green_chanceW4 & GB15_con_chanceW4 >= GB15_snp_chanceW4 & countryW4 == 2 & GB15_complete_scotlandW4 == 1 & wave4 == 1

gen GB15_lab_scotlandW4 = 1 if GB15_lab_chanceW4 >= GB15_con_chanceW4 & GB15_lab_chanceW4 >= GB15_ld_chanceW4 & GB15_lab_chanceW4 >= GB15_ukip_chanceW4 & GB15_lab_chanceW4 >= GB15_green_chanceW4 & GB15_lab_chanceW4 >= GB15_snp_chanceW4 & countryW4 == 2 & GB15_complete_scotlandW4 == 1 & wave4 == 1

gen GB15_ld_scotlandW4 = 1 if GB15_ld_chanceW4 >= GB15_con_chanceW4 & GB15_ld_chanceW4 >= GB15_lab_chanceW4 & GB15_ld_chanceW4 >= GB15_ukip_chanceW4 & GB15_ld_chanceW4 >= GB15_green_chanceW4 & GB15_ld_chanceW4 >= GB15_snp_chanceW4 & countryW4 == 2 & GB15_complete_scotlandW4 == 1 & wave4 == 1

gen GB15_ukip_scotlandW4 = 1 if GB15_ukip_chanceW4 >= GB15_con_chanceW4 & GB15_ukip_chanceW4 >= GB15_lab_chanceW4 & GB15_ukip_chanceW4 >= GB15_ld_chanceW4 & GB15_ukip_chanceW4 >= GB15_green_chanceW4 & GB15_ukip_chanceW4 >= GB15_snp_chanceW4 & countryW4 == 2 & GB15_complete_scotlandW4== 1 & wave4 == 1

gen GB15_green_scotlandW4 = 1 if GB15_green_chanceW4 >= GB15_con_chanceW4 & GB15_green_chanceW4 >= GB15_lab_chanceW4 & GB15_green_chanceW4 >= GB15_ld_chanceW4 & GB15_green_chanceW4 >= GB15_ukip_chanceW4 & GB15_green_chanceW4 >= GB15_snp_chanceW4 & countryW4 == 2 & GB15_complete_scotlandW4 == 1 & wave4 == 1

gen GB15_snp_scotlandW4 = 1 if GB15_snp_chanceW4 >= GB15_con_chanceW4 & GB15_snp_chanceW4 >= GB15_lab_chanceW4 & GB15_snp_chanceW4 >= GB15_ld_chanceW4 & GB15_snp_chanceW4 >= GB15_ukip_chanceW4 & GB15_snp_chanceW4 >= GB15_green_chanceW4 & countryW4 == 2 & GB15_complete_scotlandW4 == 1 & wave4 == 1

gen GB15_oth_scotlandW4 = 1 if GB15_con_chanceW4 == 0 & GB15_lab_chanceW4 == 0 & GB15_ld_chanceW4 == 0 & GB15_ukip_chanceW4 == 0 & GB15_green_chanceW4 == 0 & GB15_snp_chanceW4 == 0 & countryW4 == 2 & GB15_complete_scotlandW4 == 1 & wave4 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Wales)

gen GB15_con_walesW4 = 1 if GB15_con_chanceW4 >= GB15_lab_chanceW4 & GB15_con_chanceW4 >= GB15_ld_chanceW4 & GB15_con_chanceW4 >= GB15_ukip_chanceW4 & GB15_con_chanceW4 >= GB15_green_chanceW4 & GB15_con_chanceW4 >= GB15_pc_chanceW4 & countryW4 == 3 & GB15_complete_walesW4 == 1 & wave4 == 1

gen GB15_lab_walesW4 = 1 if GB15_lab_chanceW4 >= GB15_con_chanceW4 & GB15_lab_chanceW4 >= GB15_ld_chanceW4 & GB15_lab_chanceW4 >= GB15_ukip_chanceW4 & GB15_lab_chanceW4 >= GB15_green_chanceW4 & GB15_lab_chanceW4 >= GB15_pc_chanceW4 & countryW4 == 3 & GB15_complete_walesW4 == 1 & wave4 == 1

gen GB15_ld_walesW4 = 1 if GB15_ld_chanceW4 >= GB15_con_chanceW4 & GB15_ld_chanceW4 >= GB15_lab_chanceW4 & GB15_ld_chanceW4 >= GB15_ukip_chanceW4 & GB15_ld_chanceW4 >= GB15_green_chanceW4 & GB15_ld_chanceW4 >= GB15_pc_chanceW4 & countryW4 == 3 & GB15_complete_walesW4 == 1 & wave4 == 1

gen GB15_ukip_walesW4 = 1 if GB15_ukip_chanceW4 >= GB15_con_chanceW4 & GB15_ukip_chanceW4 >= GB15_lab_chanceW4 & GB15_ukip_chanceW4 >= GB15_ld_chanceW4 & GB15_ukip_chanceW4 >= GB15_green_chanceW4 & GB15_ukip_chanceW4 >= GB15_pc_chanceW4 & countryW4 == 3 & GB15_complete_walesW4 == 1 & wave4 == 1

gen GB15_green_walesW4 = 1 if GB15_green_chanceW4 >= GB15_con_chanceW4 & GB15_green_chanceW4 >= GB15_lab_chanceW4 & GB15_green_chanceW4 >= GB15_ld_chanceW4 & GB15_green_chanceW4 >= GB15_ukip_chanceW4 & GB15_green_chanceW4 >= GB15_pc_chanceW4 & countryW4 == 3 & GB15_complete_walesW4 == 1 & wave4 == 1

gen GB15_pc_walesW4 = 1 if GB15_pc_chanceW4 >= GB15_con_chanceW4 & GB15_pc_chanceW4 >= GB15_lab_chanceW4 & GB15_pc_chanceW4 >= GB15_ld_chanceW4 & GB15_pc_chanceW4 >= GB15_ukip_chanceW4 & GB15_pc_chanceW4 >= GB15_green_chanceW4 & countryW4 == 3 & GB15_complete_walesW4 == 1 & wave4 == 1

gen GB15_oth_walesW4 = 1 if GB15_con_chanceW4 == 0 & GB15_lab_chanceW4 == 0 & GB15_ld_chanceW4 == 0 & GB15_ukip_chanceW4 == 0 & GB15_green_chanceW4 == 0 & GB15_pc_chanceW4 == 0 & countryW4 == 3 & GB15_complete_walesW4 == 1 & wave4 == 1

* Combine

gen GB15_conW4 = max(GB15_con_englandW4,GB15_con_scotlandW4,GB15_con_walesW4) if GB15_completeW4 == 1 & wave4 == 1
gen GB15_labW4 = max(GB15_lab_englandW4,GB15_lab_scotlandW4,GB15_lab_walesW4) if GB15_completeW4 == 1 & wave4 == 1
gen GB15_ldW4 = max(GB15_ld_englandW4,GB15_ld_scotlandW4,GB15_ld_walesW4) if GB15_completeW4 == 1 & wave4 == 1
gen GB15_ukipW4 = max(GB15_ukip_englandW4,GB15_ukip_scotlandW4,GB15_ukip_walesW4) if GB15_completeW4 == 1 & wave4 == 1
gen GB15_greenW4 = max(GB15_green_englandW4,GB15_green_scotlandW4,GB15_green_walesW4) if GB15_completeW4 == 1 & wave4 == 1
gen GB15_snpW4 = GB15_snp_scotlandW4 if GB15_completeW4 == 1 & wave4 == 1
gen GB15_pcW4 = GB15_pc_walesW4 if GB15_completeW4 == 1 & wave4 == 1
gen GB15_othW4 = max(GB15_oth_englandW4,GB15_oth_scotlandW4,GB15_oth_walesW4) if GB15_completeW4 == 1 & wave4 == 1

replace GB15_conW4 = . if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_labW4 = . if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_ldW4 = . if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_ukipW4 = . if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_greenW4 = . if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_snpW4 = . if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_pcW4 = . if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1

* Generate variable for ambiguous forecasts

gen GB15_ambiguous_districtW4 = .

replace GB15_ambiguous_districtW4 = 99 if GB15_conW4 == GB15_labW4 & GB15_conW4!=. & wave4 == 1 | GB15_conW4 == GB15_ldW4 & GB15_conW4!=. & wave4 == 1 | GB15_conW4 == GB15_ukipW4 & GB15_conW4!=. & wave4 == 1 | GB15_conW4 == GB15_greenW4 & GB15_conW4!=. & wave4 == 1 | GB15_conW4 == GB15_snpW4 & GB15_conW4!=. & wave4 == 1 | GB15_conW4 == GB15_pcW4 & GB15_conW4!=. & wave4 == 1

replace GB15_ambiguous_districtW4 = 99 if GB15_labW4 == GB15_conW4 & GB15_labW4!=. & wave4 == 1 | GB15_labW4 == GB15_ldW4 & GB15_labW4!=. & wave4 == 1 | GB15_labW4 == GB15_ukipW4 & GB15_labW4!=. & wave4 == 1 | GB15_labW4 == GB15_greenW4 & GB15_labW4!=. & wave4 == 1 | GB15_labW4 == GB15_snpW4 & GB15_labW4!=. & wave4 == 1 | GB15_labW4 == GB15_pcW4 & GB15_labW4!=. & wave4 == 1

replace GB15_ambiguous_districtW4 = 99 if GB15_ldW4 == GB15_conW4 & GB15_ldW4!=. & wave4 == 1 | GB15_ldW4 == GB15_labW4 & GB15_ldW4!=. & wave4 == 1 | GB15_ldW4 == GB15_ukipW4 & GB15_ldW4!=. & wave4 == 1 | GB15_ldW4 == GB15_greenW4 & GB15_ldW4!=. & wave4 == 1 | GB15_ldW4 == GB15_snpW4 & GB15_ldW4!=. & wave4 == 1 | GB15_ldW4 == GB15_pcW4 & GB15_ldW4!=. & wave4 == 1

replace GB15_ambiguous_districtW4 = 99 if GB15_ukipW4 == GB15_conW4 & GB15_ukipW4!=. & wave4 == 1 | GB15_ukipW4 == GB15_labW4 & GB15_ukipW4!=. & wave4 == 1 | GB15_ukipW4 == GB15_ldW4 & GB15_ukipW4!=. & wave4 == 1 | GB15_ukipW4 == GB15_greenW4 & GB15_ukipW4!=. & wave4 == 1 | GB15_ukipW4 == GB15_snpW4 & GB15_ukipW4!=. & wave4 == 1 | GB15_ukipW4 == GB15_pcW4 & GB15_ukipW4!=. & wave4 == 1

replace GB15_ambiguous_districtW4 = 99 if GB15_greenW4 == GB15_conW4 & GB15_greenW4!=. & wave4 == 1 | GB15_greenW4 == GB15_labW4 & GB15_greenW4!=. & wave4 == 1 | GB15_greenW4 == GB15_ldW4 & GB15_greenW4!=. & wave4 == 1 | GB15_greenW4 == GB15_ukipW4 & GB15_greenW4!=. & wave4 == 1 | GB15_greenW4 == GB15_snpW4 & GB15_greenW4!=. & wave4 == 1 | GB15_greenW4 == GB15_pcW4 & GB15_greenW4!=. & wave4 == 1

replace GB15_ambiguous_districtW4 = 99 if GB15_snpW4 == GB15_conW4 & GB15_snpW4!=. & wave4 == 1 | GB15_snpW4 == GB15_labW4 & GB15_snpW4!=. & wave4 == 1 | GB15_snpW4 == GB15_ldW4 & GB15_snpW4!=. & wave4 == 1 | GB15_snpW4 == GB15_ukipW4 & GB15_snpW4!=. & wave4 == 1 | GB15_snpW4 == GB15_greenW4 & GB15_snpW4!=. & wave4 == 1 | GB15_snpW4 == GB15_pcW4 & GB15_snpW4!=. & wave4 == 1

replace GB15_ambiguous_districtW4 = 99 if GB15_pcW4 == GB15_conW4 & GB15_pcW4!=. & wave4 == 1 | GB15_pcW4 == GB15_labW4 & GB15_pcW4!=. & wave4 == 1 | GB15_pcW4 == GB15_ldW4 & GB15_pcW4!=. & wave4 == 1 | GB15_pcW4 == GB15_ukipW4 & GB15_pcW4!=. & wave4 == 1 | GB15_pcW4 == GB15_greenW4 & GB15_pcW4!=. & wave4 == 1 | GB15_pcW4 == GB15_snpW4 & GB15_pcW4!=. & wave4 == 1

gen GB15_ambW4 = 1 if GB15_ambiguous_districtW4 == 99 & GB15_completeW4 == 1

* Generate value of 0 for lower expectations

replace GB15_conW4 = 0 if GB15_conW4!=1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_labW4 = 0 if GB15_labW4!=1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_ldW4 = 0 if GB15_ldW4!=1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_ukipW4 = 0 if GB15_ukipW4!=1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_greenW4 = 0 if GB15_greenW4!=1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_snpW4 = 0 if GB15_snpW4!=1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_pcW4 = 0 if GB15_pcW4!=1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_othW4 = 0 if GB15_othW4!=1 & GB15_completeW4 == 1 & wave4 == 1

* Forecasts (1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = Scottish National Party, 5 = Plaid Cymru, 6 = United Kingdom Independence Party, 7 = Green Party, 8 = British National Party, 9 = other party, 11 = Change UK – The Independent Group, 12 = Brexit Party, 99 = ambiguous)

gen GB15_forecast_districtW4 = .

replace GB15_forecast_districtW4 = 1 if GB15_conW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 2 if GB15_labW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 3 if GB15_ldW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 6 if GB15_ukipW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 7 if GB15_greenW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 4 if GB15_snpW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 5 if GB15_pcW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 9 if GB15_othW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_forecast_districtW4 = 99 if GB15_ambiguous_districtW4 == 99 & GB15_completeW4 == 1 & wave4 == 1

* Identify correct and ambiguous forecasts

gen GB15_correct_districtW4 = 0 if GB15_forecast_districtW4!=GB15_outcomeW4 & GB15_forecast_districtW4!=99 & GB15_outcomeW4!=. & GB15_completeW4== 1 & wave4 == 1
replace GB15_correct_districtW4 = 1 if GB15_forecast_districtW4 == GB15_outcomeW4 & GB15_forecast_districtW4!=99 & GB15_outcomeW4!=. & GB15_completeW4== 1 & wave4 == 1

replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_conW4!=1 & GB15_outcomeW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_labW4!=1 & GB15_outcomeW4 == 2 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_ldW4!=1 & GB15_outcomeW4 == 3 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_ukipW4!=1 & GB15_outcomeW4 == 6 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_greenW4!=1 & GB15_outcomeW4 == 7 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_snpW4!=1 & GB15_outcomeW4 == 4 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_pcW4!=1 & GB15_outcomeW4 == 5 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 0 if GB15_forecast_districtW4 == 99 & GB15_othW4!=1 & GB15_outcomeW4 == 9 & GB15_completeW4 == 1 & wave4 == 1

replace GB15_correct_districtW4 = 0 if winConstituencyConW4 == 9999 & winConstituencyLabW4 == 9999 & winConstituencyLDW4 == 9999 & winConstituencyUKIPW4 == 9999 & winConstituencyGreenW4 == 9999 & countryW4 == 1 & wave4 == 1

replace GB15_correct_districtW4 = 0 if winConstituencyConW4 == 9999 & winConstituencyLabW4 == 9999 & winConstituencyLDW4 == 9999 & winConstituencyUKIPW4 == 9999 & winConstituencyGreenW4 == 9999 & winConstituencySNPW4 == 9999 & countryW4 == 2 & wave4 == 1

replace GB15_correct_districtW4 = 0 if winConstituencyConW4 == 9999 & winConstituencyLabW4 == 9999 & winConstituencyLDW4 == 9999 & winConstituencyUKIPW4 == 9999 & winConstituencyGreenW4 == 9999 & winConstituencyPCW4 == 9999 & countryW4 == 3 & wave4 == 1

replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_conW4 == 1 & GB15_outcomeW4 == 1 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_labW4 == 1 & GB15_outcomeW4 == 2 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_ldW4 == 1 & GB15_outcomeW4 == 3 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_ukipW4 == 1 & GB15_outcomeW4 == 6 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_greenW4 == 1 & GB15_outcomeW4 == 7 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_snpW4 == 1 & GB15_outcomeW4 == 4 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_pcW4 == 1 & GB15_outcomeW4 == 5 & GB15_completeW4 == 1 & wave4 == 1
replace GB15_correct_districtW4 = 99 if GB15_forecast_districtW4 == 99 & GB15_othW4 == 1 & GB15_outcomeW4 == 9 & GB15_completeW4 == 1 & wave4 == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen GB15_correct_districtW4_d = GB15_correct_districtW4

replace GB15_correct_districtW4_d = 0 if GB15_correct_districtW4_d == 99
replace GB15_correct_districtW4_d = 1 if GB15_correct_districtW4_d == 1


*****************************************************************
** DISTRICT-LEVEL EXPECTATIONS: 2015 GENERAL ELECTION (WAVE 5) **
*****************************************************************

* Generate variable identifying incomplete answers (PC in Wales only, SNP in Scotland only)

gen GB15_con_chanceW5 = winConstituencyConW5 
gen GB15_lab_chanceW5 = winConstituencyLabW5 
gen GB15_ld_chanceW5 = winConstituencyLDW5 
gen GB15_ukip_chanceW5 = winConstituencyUKIPW5 
gen GB15_green_chanceW5 = winConstituencyGreenW5 
gen GB15_snp_chanceW5 = winConstituencySNPW5 
gen GB15_pc_chanceW5 = winConstituencyPCW5 

recode GB15_con_chanceW5 GB15_lab_chanceW5 GB15_ld_chanceW5 GB15_ukip_chanceW5 GB15_green_chanceW5 GB15_snp_chanceW5 GB15_pc_chanceW5 (9999=.) 

gen GB15_complete_englandW5 = 1 if GB15_con_chanceW5!=. & GB15_lab_chanceW5!=. & GB15_ld_chanceW5!=. & GB15_ukip_chanceW5!=. & GB15_green_chanceW5!=. & wave5 == 1 & countryW5 == 1

gen GB15_complete_scotlandW5 = 1 if GB15_con_chanceW5!=. & GB15_lab_chanceW5!=. & GB15_ld_chanceW5!=. & GB15_ukip_chanceW5!=. & GB15_green_chanceW5!=. & GB15_snp_chanceW5!=. & wave5 == 1 & countryW5 == 2

gen GB15_complete_walesW5 = 1 if GB15_con_chanceW5!=. & GB15_lab_chanceW5!=. & GB15_ld_chanceW5!=. & GB15_ukip_chanceW5!=. & GB15_green_chanceW5!=. & GB15_pc_chanceW5!=. & wave5 == 1 & countryW5 == 3

gen GB15_completeW5 = max(GB15_complete_englandW5,GB15_complete_walesW5,GB15_complete_scotlandW5)

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (England)

gen GB15_con_englandW5 = 1 if GB15_con_chanceW5 >= GB15_lab_chanceW5 & GB15_con_chanceW5 >= GB15_ld_chanceW5 & GB15_con_chanceW5 >= GB15_ukip_chanceW5 & GB15_con_chanceW5 >= GB15_green_chanceW5 & countryW5 == 1 & GB15_complete_englandW5 == 1 & wave5 == 1

gen GB15_lab_englandW5 = 1 if GB15_lab_chanceW5 >= GB15_con_chanceW5 & GB15_lab_chanceW5 >= GB15_ld_chanceW5 & GB15_lab_chanceW5 >= GB15_ukip_chanceW5 & GB15_lab_chanceW5 >= GB15_green_chanceW5 & countryW5 == 1 & GB15_complete_englandW5 == 1 & wave5 == 1

gen GB15_ld_englandW5 = 1 if GB15_ld_chanceW5 >= GB15_con_chanceW5 & GB15_ld_chanceW5 >= GB15_lab_chanceW5 & GB15_ld_chanceW5 >= GB15_ukip_chanceW5 & GB15_ld_chanceW5 >= GB15_green_chanceW5 & countryW5 == 1 & GB15_complete_englandW5 == 1 & wave5 == 1

gen GB15_ukip_englandW5 = 1 if GB15_ukip_chanceW5 >= GB15_con_chanceW5 & GB15_ukip_chanceW5 >= GB15_lab_chanceW5 & GB15_ukip_chanceW5 >= GB15_ld_chanceW5 & GB15_ukip_chanceW5 >= GB15_green_chanceW5 & countryW5 == 1 & GB15_complete_englandW5 == 1 & wave5 == 1

gen GB15_green_englandW5 = 1 if GB15_green_chanceW5 >= GB15_con_chanceW5 & GB15_green_chanceW5 >= GB15_lab_chanceW5 & GB15_green_chanceW5 >= GB15_ld_chanceW5 & GB15_green_chanceW5 >= GB15_ukip_chanceW5 & countryW5 == 1 & GB15_complete_englandW5 == 1 & wave5 == 1

gen GB15_oth_englandW5 = 1 if GB15_con_chanceW5 == 0 & GB15_lab_chanceW5 == 0 & GB15_ld_chanceW5 == 0 & GB15_ukip_chanceW5 == 0 & countryW5 == 1 & GB15_complete_englandW5 == 1 & wave5 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Scotland)

gen GB15_con_scotlandW5 = 1 if GB15_con_chanceW5 >= GB15_lab_chanceW5 & GB15_con_chanceW5 >= GB15_ld_chanceW5 & GB15_con_chanceW5 >= GB15_ukip_chanceW5 & GB15_con_chanceW5 >= GB15_green_chanceW5 & GB15_con_chanceW5 >= GB15_snp_chanceW5 & countryW5 == 2 & GB15_complete_scotlandW5 == 1 & wave5 == 1

gen GB15_lab_scotlandW5 = 1 if GB15_lab_chanceW5 >= GB15_con_chanceW5 & GB15_lab_chanceW5 >= GB15_ld_chanceW5 & GB15_lab_chanceW5 >= GB15_ukip_chanceW5 & GB15_lab_chanceW5 >= GB15_green_chanceW5 & GB15_lab_chanceW5 >= GB15_snp_chanceW5 & countryW5 == 2 & GB15_complete_scotlandW5 == 1 & wave5 == 1

gen GB15_ld_scotlandW5 = 1 if GB15_ld_chanceW5 >= GB15_con_chanceW5 & GB15_ld_chanceW5 >= GB15_lab_chanceW5 & GB15_ld_chanceW5 >= GB15_ukip_chanceW5 & GB15_ld_chanceW5 >= GB15_green_chanceW5 & GB15_ld_chanceW5 >= GB15_snp_chanceW5 & countryW5 == 2 & GB15_complete_scotlandW5 == 1 & wave5 == 1

gen GB15_ukip_scotlandW5 = 1 if GB15_ukip_chanceW5 >= GB15_con_chanceW5 & GB15_ukip_chanceW5 >= GB15_lab_chanceW5 & GB15_ukip_chanceW5 >= GB15_ld_chanceW5 & GB15_ukip_chanceW5 >= GB15_green_chanceW5 & GB15_ukip_chanceW5 >= GB15_snp_chanceW5 & countryW5 == 2 & GB15_complete_scotlandW5== 1 & wave5 == 1

gen GB15_green_scotlandW5 = 1 if GB15_green_chanceW5 >= GB15_con_chanceW5 & GB15_green_chanceW5 >= GB15_lab_chanceW5 & GB15_green_chanceW5 >= GB15_ld_chanceW5 & GB15_green_chanceW5 >= GB15_ukip_chanceW5 & GB15_green_chanceW5 >= GB15_snp_chanceW5 & countryW5 == 2 & GB15_complete_scotlandW5 == 1 & wave5 == 1

gen GB15_snp_scotlandW5 = 1 if GB15_snp_chanceW5 >= GB15_con_chanceW5 & GB15_snp_chanceW5 >= GB15_lab_chanceW5 & GB15_snp_chanceW5 >= GB15_ld_chanceW5 & GB15_snp_chanceW5 >= GB15_ukip_chanceW5 & GB15_snp_chanceW5 >= GB15_green_chanceW5 & countryW5 == 2 & GB15_complete_scotlandW5 == 1 & wave5 == 1

gen GB15_oth_scotlandW5 = 1 if GB15_con_chanceW5 == 0 & GB15_lab_chanceW5 == 0 & GB15_ld_chanceW5 == 0 & GB15_ukip_chanceW5 == 0 & GB15_green_chanceW5 == 0 & GB15_snp_chanceW5 == 0 & countryW5 == 2 & GB15_complete_scotlandW5 == 1 & wave5 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Wales)

gen GB15_con_walesW5 = 1 if GB15_con_chanceW5 >= GB15_lab_chanceW5 & GB15_con_chanceW5 >= GB15_ld_chanceW5 & GB15_con_chanceW5 >= GB15_ukip_chanceW5 & GB15_con_chanceW5 >= GB15_green_chanceW5 & GB15_con_chanceW5 >= GB15_pc_chanceW5 & countryW5 == 3 & GB15_complete_walesW5 == 1 & wave5 == 1

gen GB15_lab_walesW5 = 1 if GB15_lab_chanceW5 >= GB15_con_chanceW5 & GB15_lab_chanceW5 >= GB15_ld_chanceW5 & GB15_lab_chanceW5 >= GB15_ukip_chanceW5 & GB15_lab_chanceW5 >= GB15_green_chanceW5 & GB15_lab_chanceW5 >= GB15_pc_chanceW5 & countryW5 == 3 & GB15_complete_walesW5 == 1 & wave5 == 1

gen GB15_ld_walesW5 = 1 if GB15_ld_chanceW5 >= GB15_con_chanceW5 & GB15_ld_chanceW5 >= GB15_lab_chanceW5 & GB15_ld_chanceW5 >= GB15_ukip_chanceW5 & GB15_ld_chanceW5 >= GB15_green_chanceW5 & GB15_ld_chanceW5 >= GB15_pc_chanceW5 & countryW5 == 3 & GB15_complete_walesW5 == 1 & wave5 == 1

gen GB15_ukip_walesW5 = 1 if GB15_ukip_chanceW5 >= GB15_con_chanceW5 & GB15_ukip_chanceW5 >= GB15_lab_chanceW5 & GB15_ukip_chanceW5 >= GB15_ld_chanceW5 & GB15_ukip_chanceW5 >= GB15_green_chanceW5 & GB15_ukip_chanceW5 >= GB15_pc_chanceW5 & countryW5 == 3 & GB15_complete_walesW5 == 1 & wave5 == 1

gen GB15_green_walesW5 = 1 if GB15_green_chanceW5 >= GB15_con_chanceW5 & GB15_green_chanceW5 >= GB15_lab_chanceW5 & GB15_green_chanceW5 >= GB15_ld_chanceW5 & GB15_green_chanceW5 >= GB15_ukip_chanceW5 & GB15_green_chanceW5 >= GB15_pc_chanceW5 & countryW5 == 3 & GB15_complete_walesW5 == 1 & wave5 == 1

gen GB15_pc_walesW5 = 1 if GB15_pc_chanceW5 >= GB15_con_chanceW5 & GB15_pc_chanceW5 >= GB15_lab_chanceW5 & GB15_pc_chanceW5 >= GB15_ld_chanceW5 & GB15_pc_chanceW5 >= GB15_ukip_chanceW5 & GB15_pc_chanceW5 >= GB15_green_chanceW5 & countryW5 == 3 & GB15_complete_walesW5 == 1 & wave5 == 1

gen GB15_oth_walesW5 = 1 if GB15_con_chanceW5 == 0 & GB15_lab_chanceW5 == 0 & GB15_ld_chanceW5 == 0 & GB15_ukip_chanceW5 == 0 & GB15_green_chanceW5 == 0 & GB15_pc_chanceW5 == 0 & countryW5 == 3 & GB15_complete_walesW5 == 1 & wave5 == 1

* Combine

gen GB15_conW5 = max(GB15_con_englandW5,GB15_con_scotlandW5,GB15_con_walesW5) if GB15_completeW5 == 1 & wave5 == 1
gen GB15_labW5 = max(GB15_lab_englandW5,GB15_lab_scotlandW5,GB15_lab_walesW5) if GB15_completeW5 == 1 & wave5 == 1
gen GB15_ldW5 = max(GB15_ld_englandW5,GB15_ld_scotlandW5,GB15_ld_walesW5) if GB15_completeW5 == 1 & wave5 == 1
gen GB15_ukipW5 = max(GB15_ukip_englandW5,GB15_ukip_scotlandW5,GB15_ukip_walesW5) if GB15_completeW5 == 1 & wave5 == 1
gen GB15_greenW5 = max(GB15_green_englandW5,GB15_green_scotlandW5,GB15_green_walesW5) if GB15_completeW5 == 1 & wave5 == 1
gen GB15_snpW5 = GB15_snp_scotlandW5 if GB15_completeW5 == 1 & wave5 == 1
gen GB15_pcW5 = GB15_pc_walesW5 if GB15_completeW5 == 1 & wave5 == 1
gen GB15_othW5 = max(GB15_oth_englandW5,GB15_oth_scotlandW5,GB15_oth_walesW5) if GB15_completeW5 == 1 & wave5 == 1

replace GB15_conW5 = . if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_labW5 = . if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_ldW5 = . if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_ukipW5 = . if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_greenW5 = . if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_snpW5 = . if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_pcW5 = . if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1

* Generate variable for ambiguous forecasts

gen GB15_ambiguous_districtW5 = .

replace GB15_ambiguous_districtW5 = 99 if GB15_conW5 == GB15_labW5 & GB15_conW5!=. & wave5 == 1 | GB15_conW5 == GB15_ldW5 & GB15_conW5!=. & wave5 == 1 | GB15_conW5 == GB15_ukipW5 & GB15_conW5!=. & wave5 == 1 | GB15_conW5 == GB15_greenW5 & GB15_conW5!=. & wave5 == 1 | GB15_conW5 == GB15_snpW5 & GB15_conW5!=. & wave5 == 1 | GB15_conW5 == GB15_pcW5 & GB15_conW5!=. & wave5 == 1

replace GB15_ambiguous_districtW5 = 99 if GB15_labW5 == GB15_conW5 & GB15_labW5!=. & wave5 == 1 | GB15_labW5 == GB15_ldW5 & GB15_labW5!=. & wave5 == 1 | GB15_labW5 == GB15_ukipW5 & GB15_labW5!=. & wave5 == 1 | GB15_labW5 == GB15_greenW5 & GB15_labW5!=. & wave5 == 1 | GB15_labW5 == GB15_snpW5 & GB15_labW5!=. & wave5 == 1 | GB15_labW5 == GB15_pcW5 & GB15_labW5!=. & wave5 == 1

replace GB15_ambiguous_districtW5 = 99 if GB15_ldW5 == GB15_conW5 & GB15_ldW5!=. & wave5 == 1 | GB15_ldW5 == GB15_labW5 & GB15_ldW5!=. & wave5 == 1 | GB15_ldW5 == GB15_ukipW5 & GB15_ldW5!=. & wave5 == 1 | GB15_ldW5 == GB15_greenW5 & GB15_ldW5!=. & wave5 == 1 | GB15_ldW5 == GB15_snpW5 & GB15_ldW5!=. & wave5 == 1 | GB15_ldW5 == GB15_pcW5 & GB15_ldW5!=. & wave5 == 1

replace GB15_ambiguous_districtW5 = 99 if GB15_ukipW5 == GB15_conW5 & GB15_ukipW5!=. & wave5 == 1 | GB15_ukipW5 == GB15_labW5 & GB15_ukipW5!=. & wave5 == 1 | GB15_ukipW5 == GB15_ldW5 & GB15_ukipW5!=. & wave5 == 1 | GB15_ukipW5 == GB15_greenW5 & GB15_ukipW5!=. & wave5 == 1 | GB15_ukipW5 == GB15_snpW5 & GB15_ukipW5!=. & wave5 == 1 | GB15_ukipW5 == GB15_pcW5 & GB15_ukipW5!=. & wave5 == 1

replace GB15_ambiguous_districtW5 = 99 if GB15_greenW5 == GB15_conW5 & GB15_greenW5!=. & wave5 == 1 | GB15_greenW5 == GB15_labW5 & GB15_greenW5!=. & wave5 == 1 | GB15_greenW5 == GB15_ldW5 & GB15_greenW5!=. & wave5 == 1 | GB15_greenW5 == GB15_ukipW5 & GB15_greenW5!=. & wave5 == 1 | GB15_greenW5 == GB15_snpW5 & GB15_greenW5!=. & wave5 == 1 | GB15_greenW5 == GB15_pcW5 & GB15_greenW5!=. & wave5 == 1

replace GB15_ambiguous_districtW5 = 99 if GB15_snpW5 == GB15_conW5 & GB15_snpW5!=. & wave5 == 1 | GB15_snpW5 == GB15_labW5 & GB15_snpW5!=. & wave5 == 1 | GB15_snpW5 == GB15_ldW5 & GB15_snpW5!=. & wave5 == 1 | GB15_snpW5 == GB15_ukipW5 & GB15_snpW5!=. & wave5 == 1 | GB15_snpW5 == GB15_greenW5 & GB15_snpW5!=. & wave5 == 1 | GB15_snpW5 == GB15_pcW5 & GB15_snpW5!=. & wave5 == 1

replace GB15_ambiguous_districtW5 = 99 if GB15_pcW5 == GB15_conW5 & GB15_pcW5!=. & wave5 == 1 | GB15_pcW5 == GB15_labW5 & GB15_pcW5!=. & wave5 == 1 | GB15_pcW5 == GB15_ldW5 & GB15_pcW5!=. & wave5 == 1 | GB15_pcW5 == GB15_ukipW5 & GB15_pcW5!=. & wave5 == 1 | GB15_pcW5 == GB15_greenW5 & GB15_pcW5!=. & wave5 == 1 | GB15_pcW5 == GB15_snpW5 & GB15_pcW5!=. & wave5 == 1

gen GB15_ambW5 = 1 if GB15_ambiguous_districtW5 == 99 & GB15_completeW5 == 1

* Generate value of 0 for lower expectations

replace GB15_conW5 = 0 if GB15_conW5!=1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_labW5 = 0 if GB15_labW5!=1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_ldW5 = 0 if GB15_ldW5!=1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_ukipW5 = 0 if GB15_ukipW5!=1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_greenW5 = 0 if GB15_greenW5!=1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_snpW5 = 0 if GB15_snpW5!=1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_pcW5 = 0 if GB15_pcW5!=1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_othW5 = 0 if GB15_othW5!=1 & GB15_completeW5 == 1 & wave5 == 1

* Forecasts (1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = Scottish National Party, 5 = Plaid Cymru, 6 = United Kingdom Independence Party, 7 = Green Party, 8 = British National Party, 9 = other party, 11 = Change UK – The Independent Group, 12 = Brexit Party, 99 = ambiguous)

gen GB15_forecast_districtW5 = .

replace GB15_forecast_districtW5 = 1 if GB15_conW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 2 if GB15_labW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 3 if GB15_ldW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 6 if GB15_ukipW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 7 if GB15_greenW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 4 if GB15_snpW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 5 if GB15_pcW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 9 if GB15_othW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_forecast_districtW5 = 99 if GB15_ambiguous_districtW5 == 99 & GB15_completeW5 == 1 & wave5 == 1

* Identify correct and ambiguous forecasts

gen GB15_correct_districtW5 = 0 if GB15_forecast_districtW5!=GB15_outcomeW5 & GB15_forecast_districtW5!=99 & GB15_outcomeW5!=. & GB15_completeW5== 1 & wave5 == 1
replace GB15_correct_districtW5 = 1 if GB15_forecast_districtW5 == GB15_outcomeW5 & GB15_forecast_districtW5!=99 & GB15_outcomeW5!=. & GB15_completeW5== 1 & wave5 == 1

replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_conW5!=1 & GB15_outcomeW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_labW5!=1 & GB15_outcomeW5 == 2 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_ldW5!=1 & GB15_outcomeW5 == 3 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_ukipW5!=1 & GB15_outcomeW5 == 6 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_greenW5!=1 & GB15_outcomeW5 == 7 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_snpW5!=1 & GB15_outcomeW5 == 4 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_pcW5!=1 & GB15_outcomeW5 == 5 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 0 if GB15_forecast_districtW5 == 99 & GB15_othW5!=1 & GB15_outcomeW5 == 9 & GB15_completeW5 == 1 & wave5 == 1

replace GB15_correct_districtW5 = 0 if winConstituencyConW5 == 9999 & winConstituencyLabW5 == 9999 & winConstituencyLDW5 == 9999 & winConstituencyUKIPW5 == 9999 & winConstituencyGreenW5 == 9999 & countryW5 == 1 & wave5 == 1

replace GB15_correct_districtW5 = 0 if winConstituencyConW5 == 9999 & winConstituencyLabW5 == 9999 & winConstituencyLDW5 == 9999 & winConstituencyUKIPW5 == 9999 & winConstituencyGreenW5 == 9999 & winConstituencySNPW5 == 9999 & countryW5 == 2 & wave5 == 1

replace GB15_correct_districtW5 = 0 if winConstituencyConW5 == 9999 & winConstituencyLabW5 == 9999 & winConstituencyLDW5 == 9999 & winConstituencyUKIPW5 == 9999 & winConstituencyGreenW5 == 9999 & winConstituencyPCW5 == 9999 & countryW5 == 3 & wave5 == 1

replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_conW5 == 1 & GB15_outcomeW5 == 1 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_labW5 == 1 & GB15_outcomeW5 == 2 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_ldW5 == 1 & GB15_outcomeW5 == 3 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_ukipW5 == 1 & GB15_outcomeW5 == 6 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_greenW5 == 1 & GB15_outcomeW5 == 7 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_snpW5 == 1 & GB15_outcomeW5 == 4 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_pcW5 == 1 & GB15_outcomeW5 == 5 & GB15_completeW5 == 1 & wave5 == 1
replace GB15_correct_districtW5 = 99 if GB15_forecast_districtW5 == 99 & GB15_othW5 == 1 & GB15_outcomeW5 == 9 & GB15_completeW5 == 1 & wave5 == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen GB15_correct_districtW5_d = GB15_correct_districtW5

replace GB15_correct_districtW5_d = 0 if GB15_correct_districtW5_d == 99
replace GB15_correct_districtW5_d = 1 if GB15_correct_districtW5_d == 1


******************************************************************
** DISTRICT-LEVEL EXPECTATIONS: 2015 GENERAL ELECTION (WAVE 11) **
******************************************************************

* Generate variable identifying incomplete answers (PC in Wales only, SNP in Scotland only)

gen GB17_con_chanceW11 = winConstituencyConW11 
gen GB17_lab_chanceW11 = winConstituencyLabW11 
gen GB17_ld_chanceW11 = winConstituencyLDW11 
gen GB17_ukip_chanceW11 = winConstituencyUKIPW11 
gen GB17_green_chanceW11 = winConstituencyGreenW11 
gen GB17_snp_chanceW11 = winConstituencySNPW11 
gen GB17_pc_chanceW11 = winConstituencyPCW11 

recode GB17_con_chanceW11 GB17_lab_chanceW11 GB17_ld_chanceW11 GB17_ukip_chanceW11 GB17_green_chanceW11 GB17_snp_chanceW11 GB17_pc_chanceW11 (9999=.)

gen GB17_complete_englandW11 = 1 if GB17_con_chanceW11!=. & GB17_lab_chanceW11!=. & GB17_ld_chanceW11!=. & GB17_ukip_chanceW11!=. & GB17_green_chanceW11!=. & wave5 == 1 & countryW11 == 1

gen GB17_complete_scotlandW11 = 1 if GB17_con_chanceW11!=. & GB17_lab_chanceW11!=. & GB17_ld_chanceW11!=. & GB17_ukip_chanceW11!=. & GB17_green_chanceW11!=. & GB17_snp_chanceW11!=. & wave5 == 1 & countryW11 == 2

gen GB17_complete_walesW11 = 1 if GB17_con_chanceW11!=. & GB17_lab_chanceW11!=. & GB17_ld_chanceW11!=. & GB17_ukip_chanceW11!=. & GB17_green_chanceW11!=. & GB17_pc_chanceW11!=. & wave5 == 1 & countryW11 == 3

gen GB17_completeW11 = max(GB17_complete_englandW11,GB17_complete_walesW11,GB17_complete_scotlandW11)

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (England)

gen GB17_con_englandW11 = 1 if GB17_con_chanceW11 >= GB17_lab_chanceW11 & GB17_con_chanceW11 >= GB17_ld_chanceW11 & GB17_con_chanceW11 >= GB17_ukip_chanceW11 & GB17_con_chanceW11 >= GB17_green_chanceW11 & countryW11 == 1 & GB17_complete_englandW11 == 1 & wave5 == 1

gen GB17_lab_englandW11 = 1 if GB17_lab_chanceW11 >= GB17_con_chanceW11 & GB17_lab_chanceW11 >= GB17_ld_chanceW11 & GB17_lab_chanceW11 >= GB17_ukip_chanceW11 & GB17_lab_chanceW11 >= GB17_green_chanceW11 & countryW11 == 1 & GB17_complete_englandW11 == 1 & wave5 == 1

gen GB17_ld_englandW11 = 1 if GB17_ld_chanceW11 >= GB17_con_chanceW11 & GB17_ld_chanceW11 >= GB17_lab_chanceW11 & GB17_ld_chanceW11 >= GB17_ukip_chanceW11 & GB17_ld_chanceW11 >= GB17_green_chanceW11 & countryW11 == 1 & GB17_complete_englandW11 == 1 & wave5 == 1

gen GB17_ukip_englandW11 = 1 if GB17_ukip_chanceW11 >= GB17_con_chanceW11 & GB17_ukip_chanceW11 >= GB17_lab_chanceW11 & GB17_ukip_chanceW11 >= GB17_ld_chanceW11 & GB17_ukip_chanceW11 >= GB17_green_chanceW11 & countryW11 == 1 & GB17_complete_englandW11 == 1 & wave5 == 1

gen GB17_green_englandW11 = 1 if GB17_green_chanceW11 >= GB17_con_chanceW11 & GB17_green_chanceW11 >= GB17_lab_chanceW11 & GB17_green_chanceW11 >= GB17_ld_chanceW11 & GB17_green_chanceW11 >= GB17_ukip_chanceW11 & countryW11 == 1 & GB17_complete_englandW11 == 1 & wave5 == 1

gen GB17_oth_englandW11 = 1 if GB17_con_chanceW11 == 0 & GB17_lab_chanceW11 == 0 & GB17_ld_chanceW11 == 0 & GB17_ukip_chanceW11 == 0 & countryW11 == 1 & GB17_complete_englandW11 == 1 & wave5 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Scotland)

gen GB17_con_scotlandW11 = 1 if GB17_con_chanceW11 >= GB17_lab_chanceW11 & GB17_con_chanceW11 >= GB17_ld_chanceW11 & GB17_con_chanceW11 >= GB17_ukip_chanceW11 & GB17_con_chanceW11 >= GB17_green_chanceW11 & GB17_con_chanceW11 >= GB17_snp_chanceW11 & countryW11 == 2 & GB17_complete_scotlandW11 == 1 & wave5 == 1

gen GB17_lab_scotlandW11 = 1 if GB17_lab_chanceW11 >= GB17_con_chanceW11 & GB17_lab_chanceW11 >= GB17_ld_chanceW11 & GB17_lab_chanceW11 >= GB17_ukip_chanceW11 & GB17_lab_chanceW11 >= GB17_green_chanceW11 & GB17_lab_chanceW11 >= GB17_snp_chanceW11 & countryW11 == 2 & GB17_complete_scotlandW11 == 1 & wave5 == 1

gen GB17_ld_scotlandW11 = 1 if GB17_ld_chanceW11 >= GB17_con_chanceW11 & GB17_ld_chanceW11 >= GB17_lab_chanceW11 & GB17_ld_chanceW11 >= GB17_ukip_chanceW11 & GB17_ld_chanceW11 >= GB17_green_chanceW11 & GB17_ld_chanceW11 >= GB17_snp_chanceW11 & countryW11 == 2 & GB17_complete_scotlandW11 == 1 & wave5 == 1

gen GB17_ukip_scotlandW11 = 1 if GB17_ukip_chanceW11 >= GB17_con_chanceW11 & GB17_ukip_chanceW11 >= GB17_lab_chanceW11 & GB17_ukip_chanceW11 >= GB17_ld_chanceW11 & GB17_ukip_chanceW11 >= GB17_green_chanceW11 & GB17_ukip_chanceW11 >= GB17_snp_chanceW11 & countryW11 == 2 & GB17_complete_scotlandW11== 1 & wave5 == 1

gen GB17_green_scotlandW11 = 1 if GB17_green_chanceW11 >= GB17_con_chanceW11 & GB17_green_chanceW11 >= GB17_lab_chanceW11 & GB17_green_chanceW11 >= GB17_ld_chanceW11 & GB17_green_chanceW11 >= GB17_ukip_chanceW11 & GB17_green_chanceW11 >= GB17_snp_chanceW11 & countryW11 == 2 & GB17_complete_scotlandW11 == 1 & wave5 == 1

gen GB17_snp_scotlandW11 = 1 if GB17_snp_chanceW11 >= GB17_con_chanceW11 & GB17_snp_chanceW11 >= GB17_lab_chanceW11 & GB17_snp_chanceW11 >= GB17_ld_chanceW11 & GB17_snp_chanceW11 >= GB17_ukip_chanceW11 & GB17_snp_chanceW11 >= GB17_green_chanceW11 & countryW11 == 2 & GB17_complete_scotlandW11 == 1 & wave5 == 1

gen GB17_oth_scotlandW11 = 1 if GB17_con_chanceW11 == 0 & GB17_lab_chanceW11 == 0 & GB17_ld_chanceW11 == 0 & GB17_ukip_chanceW11 == 0 & GB17_green_chanceW11 == 0 & GB17_snp_chanceW11 == 0 & countryW11 == 2 & GB17_complete_scotlandW11 == 1 & wave5 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Wales)

gen GB17_con_walesW11 = 1 if GB17_con_chanceW11 >= GB17_lab_chanceW11 & GB17_con_chanceW11 >= GB17_ld_chanceW11 & GB17_con_chanceW11 >= GB17_ukip_chanceW11 & GB17_con_chanceW11 >= GB17_green_chanceW11 & GB17_con_chanceW11 >= GB17_pc_chanceW11 & countryW11 == 3 & GB17_complete_walesW11 == 1 & wave5 == 1

gen GB17_lab_walesW11 = 1 if GB17_lab_chanceW11 >= GB17_con_chanceW11 & GB17_lab_chanceW11 >= GB17_ld_chanceW11 & GB17_lab_chanceW11 >= GB17_ukip_chanceW11 & GB17_lab_chanceW11 >= GB17_green_chanceW11 & GB17_lab_chanceW11 >= GB17_pc_chanceW11 & countryW11 == 3 & GB17_complete_walesW11 == 1 & wave5 == 1

gen GB17_ld_walesW11 = 1 if GB17_ld_chanceW11 >= GB17_con_chanceW11 & GB17_ld_chanceW11 >= GB17_lab_chanceW11 & GB17_ld_chanceW11 >= GB17_ukip_chanceW11 & GB17_ld_chanceW11 >= GB17_green_chanceW11 & GB17_ld_chanceW11 >= GB17_pc_chanceW11 & countryW11 == 3 & GB17_complete_walesW11 == 1 & wave5 == 1

gen GB17_ukip_walesW11 = 1 if GB17_ukip_chanceW11 >= GB17_con_chanceW11 & GB17_ukip_chanceW11 >= GB17_lab_chanceW11 & GB17_ukip_chanceW11 >= GB17_ld_chanceW11 & GB17_ukip_chanceW11 >= GB17_green_chanceW11 & GB17_ukip_chanceW11 >= GB17_pc_chanceW11 & countryW11 == 3 & GB17_complete_walesW11 == 1 & wave5 == 1

gen GB17_green_walesW11 = 1 if GB17_green_chanceW11 >= GB17_con_chanceW11 & GB17_green_chanceW11 >= GB17_lab_chanceW11 & GB17_green_chanceW11 >= GB17_ld_chanceW11 & GB17_green_chanceW11 >= GB17_ukip_chanceW11 & GB17_green_chanceW11 >= GB17_pc_chanceW11 & countryW11 == 3 & GB17_complete_walesW11 == 1 & wave5 == 1

gen GB17_pc_walesW11 = 1 if GB17_pc_chanceW11 >= GB17_con_chanceW11 & GB17_pc_chanceW11 >= GB17_lab_chanceW11 & GB17_pc_chanceW11 >= GB17_ld_chanceW11 & GB17_pc_chanceW11 >= GB17_ukip_chanceW11 & GB17_pc_chanceW11 >= GB17_green_chanceW11 & countryW11 == 3 & GB17_complete_walesW11 == 1 & wave5 == 1

gen GB17_oth_walesW11 = 1 if GB17_con_chanceW11 == 0 & GB17_lab_chanceW11 == 0 & GB17_ld_chanceW11 == 0 & GB17_ukip_chanceW11 == 0 & GB17_green_chanceW11 == 0 & GB17_pc_chanceW11 == 0 & countryW11 == 3 & GB17_complete_walesW11 == 1 & wave5 == 1

* Combine

gen GB17_conW11 = max(GB17_con_englandW11,GB17_con_scotlandW11,GB17_con_walesW11) if GB17_completeW11 == 1 & wave5 == 1
gen GB17_labW11 = max(GB17_lab_englandW11,GB17_lab_scotlandW11,GB17_lab_walesW11) if GB17_completeW11 == 1 & wave5 == 1
gen GB17_ldW11 = max(GB17_ld_englandW11,GB17_ld_scotlandW11,GB17_ld_walesW11) if GB17_completeW11 == 1 & wave5 == 1
gen GB17_ukipW11 = max(GB17_ukip_englandW11,GB17_ukip_scotlandW11,GB17_ukip_walesW11) if GB17_completeW11 == 1 & wave5 == 1
gen GB17_greenW11 = max(GB17_green_englandW11,GB17_green_scotlandW11,GB17_green_walesW11) if GB17_completeW11 == 1 & wave5 == 1
gen GB17_snpW11 = GB17_snp_scotlandW11 if GB17_completeW11 == 1 & wave5 == 1
gen GB17_pcW11 = GB17_pc_walesW11 if GB17_completeW11 == 1 & wave5 == 1
gen GB17_othW11 = max(GB17_oth_englandW11,GB17_oth_scotlandW11,GB17_oth_walesW11) if GB17_completeW11 == 1 & wave5 == 1

replace GB17_conW11 = . if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_labW11 = . if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_ldW11 = . if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_ukipW11 = . if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_greenW11 = . if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_snpW11 = . if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_pcW11 = . if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1

* Generate variable for ambiguous forecasts

gen GB17_ambiguous_districtW11 = .

replace GB17_ambiguous_districtW11 = 99 if GB17_conW11 == GB17_labW11 & GB17_conW11!=. & wave5 == 1 | GB17_conW11 == GB17_ldW11 & GB17_conW11!=. & wave5 == 1 | GB17_conW11 == GB17_ukipW11 & GB17_conW11!=. & wave5 == 1 | GB17_conW11 == GB17_greenW11 & GB17_conW11!=. & wave5 == 1 | GB17_conW11 == GB17_snpW11 & GB17_conW11!=. & wave5 == 1 | GB17_conW11 == GB17_pcW11 & GB17_conW11!=. & wave5 == 1

replace GB17_ambiguous_districtW11 = 99 if GB17_labW11 == GB17_conW11 & GB17_labW11!=. & wave5 == 1 | GB17_labW11 == GB17_ldW11 & GB17_labW11!=. & wave5 == 1 | GB17_labW11 == GB17_ukipW11 & GB17_labW11!=. & wave5 == 1 | GB17_labW11 == GB17_greenW11 & GB17_labW11!=. & wave5 == 1 | GB17_labW11 == GB17_snpW11 & GB17_labW11!=. & wave5 == 1 | GB17_labW11 == GB17_pcW11 & GB17_labW11!=. & wave5 == 1

replace GB17_ambiguous_districtW11 = 99 if GB17_ldW11 == GB17_conW11 & GB17_ldW11!=. & wave5 == 1 | GB17_ldW11 == GB17_labW11 & GB17_ldW11!=. & wave5 == 1 | GB17_ldW11 == GB17_ukipW11 & GB17_ldW11!=. & wave5 == 1 | GB17_ldW11 == GB17_greenW11 & GB17_ldW11!=. & wave5 == 1 | GB17_ldW11 == GB17_snpW11 & GB17_ldW11!=. & wave5 == 1 | GB17_ldW11 == GB17_pcW11 & GB17_ldW11!=. & wave5 == 1

replace GB17_ambiguous_districtW11 = 99 if GB17_ukipW11 == GB17_conW11 & GB17_ukipW11!=. & wave5 == 1 | GB17_ukipW11 == GB17_labW11 & GB17_ukipW11!=. & wave5 == 1 | GB17_ukipW11 == GB17_ldW11 & GB17_ukipW11!=. & wave5 == 1 | GB17_ukipW11 == GB17_greenW11 & GB17_ukipW11!=. & wave5 == 1 | GB17_ukipW11 == GB17_snpW11 & GB17_ukipW11!=. & wave5 == 1 | GB17_ukipW11 == GB17_pcW11 & GB17_ukipW11!=. & wave5 == 1

replace GB17_ambiguous_districtW11 = 99 if GB17_greenW11 == GB17_conW11 & GB17_greenW11!=. & wave5 == 1 | GB17_greenW11 == GB17_labW11 & GB17_greenW11!=. & wave5 == 1 | GB17_greenW11 == GB17_ldW11 & GB17_greenW11!=. & wave5 == 1 | GB17_greenW11 == GB17_ukipW11 & GB17_greenW11!=. & wave5 == 1 | GB17_greenW11 == GB17_snpW11 & GB17_greenW11!=. & wave5 == 1 | GB17_greenW11 == GB17_pcW11 & GB17_greenW11!=. & wave5 == 1

replace GB17_ambiguous_districtW11 = 99 if GB17_snpW11 == GB17_conW11 & GB17_snpW11!=. & wave5 == 1 | GB17_snpW11 == GB17_labW11 & GB17_snpW11!=. & wave5 == 1 | GB17_snpW11 == GB17_ldW11 & GB17_snpW11!=. & wave5 == 1 | GB17_snpW11 == GB17_ukipW11 & GB17_snpW11!=. & wave5 == 1 | GB17_snpW11 == GB17_greenW11 & GB17_snpW11!=. & wave5 == 1 | GB17_snpW11 == GB17_pcW11 & GB17_snpW11!=. & wave5 == 1

replace GB17_ambiguous_districtW11 = 99 if GB17_pcW11 == GB17_conW11 & GB17_pcW11!=. & wave5 == 1 | GB17_pcW11 == GB17_labW11 & GB17_pcW11!=. & wave5 == 1 | GB17_pcW11 == GB17_ldW11 & GB17_pcW11!=. & wave5 == 1 | GB17_pcW11 == GB17_ukipW11 & GB17_pcW11!=. & wave5 == 1 | GB17_pcW11 == GB17_greenW11 & GB17_pcW11!=. & wave5 == 1 | GB17_pcW11 == GB17_snpW11 & GB17_pcW11!=. & wave5 == 1

gen GB17_ambW11 = 1 if GB17_ambiguous_districtW11 == 99 & GB17_completeW11 == 1

* Generate value of 0 for lower expectations

replace GB17_conW11 = 0 if GB17_conW11!=1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_labW11 = 0 if GB17_labW11!=1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_ldW11 = 0 if GB17_ldW11!=1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_ukipW11 = 0 if GB17_ukipW11!=1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_greenW11 = 0 if GB17_greenW11!=1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_snpW11 = 0 if GB17_snpW11!=1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_pcW11 = 0 if GB17_pcW11!=1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_othW11 = 0 if GB17_othW11!=1 & GB17_completeW11 == 1 & wave5 == 1

* Forecasts (1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = Scottish National Party, 5 = Plaid Cymru, 6 = United Kingdom Independence Party, 7 = Green Party, 8 = British National Party, 9 = other party, 11 = Change UK – The Independent Group, 12 = Brexit Party, 99 = ambiguous)

gen GB17_forecast_districtW11 = .

replace GB17_forecast_districtW11 = 1 if GB17_conW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 2 if GB17_labW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 3 if GB17_ldW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 6 if GB17_ukipW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 7 if GB17_greenW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 4 if GB17_snpW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 5 if GB17_pcW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 9 if GB17_othW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_forecast_districtW11 = 99 if GB17_ambiguous_districtW11 == 99 & GB17_completeW11 == 1 & wave5 == 1

* Identify correct and ambiguous forecasts

gen GB17_correct_districtW11 = 0 if GB17_forecast_districtW11!=GB17_outcomeW11 & GB17_forecast_districtW11!=99 & GB17_outcomeW11!=. & GB17_completeW11== 1 & wave5 == 1
replace GB17_correct_districtW11 = 1 if GB17_forecast_districtW11 == GB17_outcomeW11 & GB17_forecast_districtW11!=99 & GB17_outcomeW11!=. & GB17_completeW11== 1 & wave5 == 1

replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_conW11!=1 & GB17_outcomeW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_labW11!=1 & GB17_outcomeW11 == 2 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_ldW11!=1 & GB17_outcomeW11 == 3 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_ukipW11!=1 & GB17_outcomeW11 == 6 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_greenW11!=1 & GB17_outcomeW11 == 7 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_snpW11!=1 & GB17_outcomeW11 == 4 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_pcW11!=1 & GB17_outcomeW11 == 5 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 0 if GB17_forecast_districtW11 == 99 & GB17_othW11!=1 & GB17_outcomeW11 == 9 & GB17_completeW11 == 1 & wave5 == 1

replace GB17_correct_districtW11 = 0 if winConstituencyConW11 == 9999 & winConstituencyLabW11 == 9999 & winConstituencyLDW11 == 9999 & winConstituencyUKIPW11 == 9999 & winConstituencyGreenW11 == 9999 & countryW11 == 1 & wave5 == 1

replace GB17_correct_districtW11 = 0 if winConstituencyConW11 == 9999 & winConstituencyLabW11 == 9999 & winConstituencyLDW11 == 9999 & winConstituencyUKIPW11 == 9999 & winConstituencyGreenW11 == 9999 & winConstituencySNPW11 == 9999 & countryW11 == 2 & wave5 == 1

replace GB17_correct_districtW11 = 0 if winConstituencyConW11 == 9999 & winConstituencyLabW11 == 9999 & winConstituencyLDW11 == 9999 & winConstituencyUKIPW11 == 9999 & winConstituencyGreenW11 == 9999 & winConstituencyPCW11 == 9999 & countryW11 == 3 & wave5 == 1

replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_conW11 == 1 & GB17_outcomeW11 == 1 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_labW11 == 1 & GB17_outcomeW11 == 2 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_ldW11 == 1 & GB17_outcomeW11 == 3 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_ukipW11 == 1 & GB17_outcomeW11 == 6 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_greenW11 == 1 & GB17_outcomeW11 == 7 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_snpW11 == 1 & GB17_outcomeW11 == 4 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_pcW11 == 1 & GB17_outcomeW11 == 5 & GB17_completeW11 == 1 & wave5 == 1
replace GB17_correct_districtW11 = 99 if GB17_forecast_districtW11 == 99 & GB17_othW11 == 1 & GB17_outcomeW11 == 9 & GB17_completeW11 == 1 & wave5 == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen GB17_correct_districtW11_d = GB17_correct_districtW11

replace GB17_correct_districtW11_d = 0 if GB17_correct_districtW11_d == 99
replace GB17_correct_districtW11_d = 1 if GB17_correct_districtW11_d == 1


******************************************************************
** DISTRICT-LEVEL EXPECTATIONS: 2017 GENERAL ELECTION (WAVE 12) **
******************************************************************

* Generate variable identifying incomplete answers (PC in Wales only, SNP in Scotland only)

gen GB17_con_chanceW12 = winConstituencyConW12 
gen GB17_lab_chanceW12 = winConstituencyLabW12 
gen GB17_ld_chanceW12 = winConstituencyLDW12 
gen GB17_ukip_chanceW12 = winConstituencyUKIPW12 
gen GB17_green_chanceW12 = winConstituencyGreenW12 
gen GB17_snp_chanceW12 = winConstituencySNPW12 
gen GB17_pc_chanceW12 = winConstituencyPCW12 

recode GB17_con_chanceW12 GB17_lab_chanceW12 GB17_ld_chanceW12 GB17_ukip_chanceW12 GB17_green_chanceW12 GB17_snp_chanceW12 GB17_pc_chanceW12 (9999=.)

gen GB17_complete_englandW12 = 1 if GB17_con_chanceW12!=. & GB17_lab_chanceW12!=. & GB17_ld_chanceW12!=. & GB17_ukip_chanceW12!=. & GB17_green_chanceW12!=. & wave5 == 1 & countryW12 == 1

gen GB17_complete_scotlandW12 = 1 if GB17_con_chanceW12!=. & GB17_lab_chanceW12!=. & GB17_ld_chanceW12!=. & GB17_ukip_chanceW12!=. & GB17_green_chanceW12!=. & GB17_snp_chanceW12!=. & wave5 == 1 & countryW12 == 2

gen GB17_complete_walesW12 = 1 if GB17_con_chanceW12!=. & GB17_lab_chanceW12!=. & GB17_ld_chanceW12!=. & GB17_ukip_chanceW12!=. & GB17_green_chanceW12!=. & GB17_pc_chanceW12!=. & wave5 == 1 & countryW12 == 3

gen GB17_completeW12 = max(GB17_complete_englandW12,GB17_complete_walesW12,GB17_complete_scotlandW12)

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (England)

gen GB17_con_englandW12 = 1 if GB17_con_chanceW12 >= GB17_lab_chanceW12 & GB17_con_chanceW12 >= GB17_ld_chanceW12 & GB17_con_chanceW12 >= GB17_ukip_chanceW12 & GB17_con_chanceW12 >= GB17_green_chanceW12 & countryW12 == 1 & GB17_complete_englandW12 == 1 & wave5 == 1

gen GB17_lab_englandW12 = 1 if GB17_lab_chanceW12 >= GB17_con_chanceW12 & GB17_lab_chanceW12 >= GB17_ld_chanceW12 & GB17_lab_chanceW12 >= GB17_ukip_chanceW12 & GB17_lab_chanceW12 >= GB17_green_chanceW12 & countryW12 == 1 & GB17_complete_englandW12 == 1 & wave5 == 1

gen GB17_ld_englandW12 = 1 if GB17_ld_chanceW12 >= GB17_con_chanceW12 & GB17_ld_chanceW12 >= GB17_lab_chanceW12 & GB17_ld_chanceW12 >= GB17_ukip_chanceW12 & GB17_ld_chanceW12 >= GB17_green_chanceW12 & countryW12 == 1 & GB17_complete_englandW12 == 1 & wave5 == 1

gen GB17_ukip_englandW12 = 1 if GB17_ukip_chanceW12 >= GB17_con_chanceW12 & GB17_ukip_chanceW12 >= GB17_lab_chanceW12 & GB17_ukip_chanceW12 >= GB17_ld_chanceW12 & GB17_ukip_chanceW12 >= GB17_green_chanceW12 & countryW12 == 1 & GB17_complete_englandW12 == 1 & wave5 == 1

gen GB17_green_englandW12 = 1 if GB17_green_chanceW12 >= GB17_con_chanceW12 & GB17_green_chanceW12 >= GB17_lab_chanceW12 & GB17_green_chanceW12 >= GB17_ld_chanceW12 & GB17_green_chanceW12 >= GB17_ukip_chanceW12 & countryW12 == 1 & GB17_complete_englandW12 == 1 & wave5 == 1

gen GB17_oth_englandW12 = 1 if GB17_con_chanceW12 == 0 & GB17_lab_chanceW12 == 0 & GB17_ld_chanceW12 == 0 & GB17_ukip_chanceW12 == 0 & countryW12 == 1 & GB17_complete_englandW12 == 1 & wave5 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Scotland)

gen GB17_con_scotlandW12 = 1 if GB17_con_chanceW12 >= GB17_lab_chanceW12 & GB17_con_chanceW12 >= GB17_ld_chanceW12 & GB17_con_chanceW12 >= GB17_ukip_chanceW12 & GB17_con_chanceW12 >= GB17_green_chanceW12 & GB17_con_chanceW12 >= GB17_snp_chanceW12 & countryW12 == 2 & GB17_complete_scotlandW12 == 1 & wave5 == 1

gen GB17_lab_scotlandW12 = 1 if GB17_lab_chanceW12 >= GB17_con_chanceW12 & GB17_lab_chanceW12 >= GB17_ld_chanceW12 & GB17_lab_chanceW12 >= GB17_ukip_chanceW12 & GB17_lab_chanceW12 >= GB17_green_chanceW12 & GB17_lab_chanceW12 >= GB17_snp_chanceW12 & countryW12 == 2 & GB17_complete_scotlandW12 == 1 & wave5 == 1

gen GB17_ld_scotlandW12 = 1 if GB17_ld_chanceW12 >= GB17_con_chanceW12 & GB17_ld_chanceW12 >= GB17_lab_chanceW12 & GB17_ld_chanceW12 >= GB17_ukip_chanceW12 & GB17_ld_chanceW12 >= GB17_green_chanceW12 & GB17_ld_chanceW12 >= GB17_snp_chanceW12 & countryW12 == 2 & GB17_complete_scotlandW12 == 1 & wave5 == 1

gen GB17_ukip_scotlandW12 = 1 if GB17_ukip_chanceW12 >= GB17_con_chanceW12 & GB17_ukip_chanceW12 >= GB17_lab_chanceW12 & GB17_ukip_chanceW12 >= GB17_ld_chanceW12 & GB17_ukip_chanceW12 >= GB17_green_chanceW12 & GB17_ukip_chanceW12 >= GB17_snp_chanceW12 & countryW12 == 2 & GB17_complete_scotlandW12== 1 & wave5 == 1

gen GB17_green_scotlandW12 = 1 if GB17_green_chanceW12 >= GB17_con_chanceW12 & GB17_green_chanceW12 >= GB17_lab_chanceW12 & GB17_green_chanceW12 >= GB17_ld_chanceW12 & GB17_green_chanceW12 >= GB17_ukip_chanceW12 & GB17_green_chanceW12 >= GB17_snp_chanceW12 & countryW12 == 2 & GB17_complete_scotlandW12 == 1 & wave5 == 1

gen GB17_snp_scotlandW12 = 1 if GB17_snp_chanceW12 >= GB17_con_chanceW12 & GB17_snp_chanceW12 >= GB17_lab_chanceW12 & GB17_snp_chanceW12 >= GB17_ld_chanceW12 & GB17_snp_chanceW12 >= GB17_ukip_chanceW12 & GB17_snp_chanceW12 >= GB17_green_chanceW12 & countryW12 == 2 & GB17_complete_scotlandW12 == 1 & wave5 == 1

gen GB17_oth_scotlandW12 = 1 if GB17_con_chanceW12 == 0 & GB17_lab_chanceW12 == 0 & GB17_ld_chanceW12 == 0 & GB17_ukip_chanceW12 == 0 & GB17_green_chanceW12 == 0 & GB17_snp_chanceW12 == 0 & countryW12 == 2 & GB17_complete_scotlandW12 == 1 & wave5 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Wales)

gen GB17_con_walesW12 = 1 if GB17_con_chanceW12 >= GB17_lab_chanceW12 & GB17_con_chanceW12 >= GB17_ld_chanceW12 & GB17_con_chanceW12 >= GB17_ukip_chanceW12 & GB17_con_chanceW12 >= GB17_green_chanceW12 & GB17_con_chanceW12 >= GB17_pc_chanceW12 & countryW12 == 3 & GB17_complete_walesW12 == 1 & wave5 == 1

gen GB17_lab_walesW12 = 1 if GB17_lab_chanceW12 >= GB17_con_chanceW12 & GB17_lab_chanceW12 >= GB17_ld_chanceW12 & GB17_lab_chanceW12 >= GB17_ukip_chanceW12 & GB17_lab_chanceW12 >= GB17_green_chanceW12 & GB17_lab_chanceW12 >= GB17_pc_chanceW12 & countryW12 == 3 & GB17_complete_walesW12 == 1 & wave5 == 1

gen GB17_ld_walesW12 = 1 if GB17_ld_chanceW12 >= GB17_con_chanceW12 & GB17_ld_chanceW12 >= GB17_lab_chanceW12 & GB17_ld_chanceW12 >= GB17_ukip_chanceW12 & GB17_ld_chanceW12 >= GB17_green_chanceW12 & GB17_ld_chanceW12 >= GB17_pc_chanceW12 & countryW12 == 3 & GB17_complete_walesW12 == 1 & wave5 == 1

gen GB17_ukip_walesW12 = 1 if GB17_ukip_chanceW12 >= GB17_con_chanceW12 & GB17_ukip_chanceW12 >= GB17_lab_chanceW12 & GB17_ukip_chanceW12 >= GB17_ld_chanceW12 & GB17_ukip_chanceW12 >= GB17_green_chanceW12 & GB17_ukip_chanceW12 >= GB17_pc_chanceW12 & countryW12 == 3 & GB17_complete_walesW12 == 1 & wave5 == 1

gen GB17_green_walesW12 = 1 if GB17_green_chanceW12 >= GB17_con_chanceW12 & GB17_green_chanceW12 >= GB17_lab_chanceW12 & GB17_green_chanceW12 >= GB17_ld_chanceW12 & GB17_green_chanceW12 >= GB17_ukip_chanceW12 & GB17_green_chanceW12 >= GB17_pc_chanceW12 & countryW12 == 3 & GB17_complete_walesW12 == 1 & wave5 == 1

gen GB17_pc_walesW12 = 1 if GB17_pc_chanceW12 >= GB17_con_chanceW12 & GB17_pc_chanceW12 >= GB17_lab_chanceW12 & GB17_pc_chanceW12 >= GB17_ld_chanceW12 & GB17_pc_chanceW12 >= GB17_ukip_chanceW12 & GB17_pc_chanceW12 >= GB17_green_chanceW12 & countryW12 == 3 & GB17_complete_walesW12 == 1 & wave5 == 1

gen GB17_oth_walesW12 = 1 if GB17_con_chanceW12 == 0 & GB17_lab_chanceW12 == 0 & GB17_ld_chanceW12 == 0 & GB17_ukip_chanceW12 == 0 & GB17_green_chanceW12 == 0 & GB17_pc_chanceW12 == 0 & countryW12 == 3 & GB17_complete_walesW12 == 1 & wave5 == 1

* Combine

gen GB17_conW12 = max(GB17_con_englandW12,GB17_con_scotlandW12,GB17_con_walesW12) if GB17_completeW12 == 1 & wave5 == 1
gen GB17_labW12 = max(GB17_lab_englandW12,GB17_lab_scotlandW12,GB17_lab_walesW12) if GB17_completeW12 == 1 & wave5 == 1
gen GB17_ldW12 = max(GB17_ld_englandW12,GB17_ld_scotlandW12,GB17_ld_walesW12) if GB17_completeW12 == 1 & wave5 == 1
gen GB17_ukipW12 = max(GB17_ukip_englandW12,GB17_ukip_scotlandW12,GB17_ukip_walesW12) if GB17_completeW12 == 1 & wave5 == 1
gen GB17_greenW12 = max(GB17_green_englandW12,GB17_green_scotlandW12,GB17_green_walesW12) if GB17_completeW12 == 1 & wave5 == 1
gen GB17_snpW12 = GB17_snp_scotlandW12 if GB17_completeW12 == 1 & wave5 == 1
gen GB17_pcW12 = GB17_pc_walesW12 if GB17_completeW12 == 1 & wave5 == 1
gen GB17_othW12 = max(GB17_oth_englandW12,GB17_oth_scotlandW12,GB17_oth_walesW12) if GB17_completeW12 == 1 & wave5 == 1

replace GB17_conW12 = . if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_labW12 = . if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_ldW12 = . if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_ukipW12 = . if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_greenW12 = . if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_snpW12 = . if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_pcW12 = . if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1

* Generate variable for ambiguous forecasts

gen GB17_ambiguous_districtW12 = .

replace GB17_ambiguous_districtW12 = 99 if GB17_conW12 == GB17_labW12 & GB17_conW12!=. & wave5 == 1 | GB17_conW12 == GB17_ldW12 & GB17_conW12!=. & wave5 == 1 | GB17_conW12 == GB17_ukipW12 & GB17_conW12!=. & wave5 == 1 | GB17_conW12 == GB17_greenW12 & GB17_conW12!=. & wave5 == 1 | GB17_conW12 == GB17_snpW12 & GB17_conW12!=. & wave5 == 1 | GB17_conW12 == GB17_pcW12 & GB17_conW12!=. & wave5 == 1

replace GB17_ambiguous_districtW12 = 99 if GB17_labW12 == GB17_conW12 & GB17_labW12!=. & wave5 == 1 | GB17_labW12 == GB17_ldW12 & GB17_labW12!=. & wave5 == 1 | GB17_labW12 == GB17_ukipW12 & GB17_labW12!=. & wave5 == 1 | GB17_labW12 == GB17_greenW12 & GB17_labW12!=. & wave5 == 1 | GB17_labW12 == GB17_snpW12 & GB17_labW12!=. & wave5 == 1 | GB17_labW12 == GB17_pcW12 & GB17_labW12!=. & wave5 == 1

replace GB17_ambiguous_districtW12 = 99 if GB17_ldW12 == GB17_conW12 & GB17_ldW12!=. & wave5 == 1 | GB17_ldW12 == GB17_labW12 & GB17_ldW12!=. & wave5 == 1 | GB17_ldW12 == GB17_ukipW12 & GB17_ldW12!=. & wave5 == 1 | GB17_ldW12 == GB17_greenW12 & GB17_ldW12!=. & wave5 == 1 | GB17_ldW12 == GB17_snpW12 & GB17_ldW12!=. & wave5 == 1 | GB17_ldW12 == GB17_pcW12 & GB17_ldW12!=. & wave5 == 1

replace GB17_ambiguous_districtW12 = 99 if GB17_ukipW12 == GB17_conW12 & GB17_ukipW12!=. & wave5 == 1 | GB17_ukipW12 == GB17_labW12 & GB17_ukipW12!=. & wave5 == 1 | GB17_ukipW12 == GB17_ldW12 & GB17_ukipW12!=. & wave5 == 1 | GB17_ukipW12 == GB17_greenW12 & GB17_ukipW12!=. & wave5 == 1 | GB17_ukipW12 == GB17_snpW12 & GB17_ukipW12!=. & wave5 == 1 | GB17_ukipW12 == GB17_pcW12 & GB17_ukipW12!=. & wave5 == 1

replace GB17_ambiguous_districtW12 = 99 if GB17_greenW12 == GB17_conW12 & GB17_greenW12!=. & wave5 == 1 | GB17_greenW12 == GB17_labW12 & GB17_greenW12!=. & wave5 == 1 | GB17_greenW12 == GB17_ldW12 & GB17_greenW12!=. & wave5 == 1 | GB17_greenW12 == GB17_ukipW12 & GB17_greenW12!=. & wave5 == 1 | GB17_greenW12 == GB17_snpW12 & GB17_greenW12!=. & wave5 == 1 | GB17_greenW12 == GB17_pcW12 & GB17_greenW12!=. & wave5 == 1

replace GB17_ambiguous_districtW12 = 99 if GB17_snpW12 == GB17_conW12 & GB17_snpW12!=. & wave5 == 1 | GB17_snpW12 == GB17_labW12 & GB17_snpW12!=. & wave5 == 1 | GB17_snpW12 == GB17_ldW12 & GB17_snpW12!=. & wave5 == 1 | GB17_snpW12 == GB17_ukipW12 & GB17_snpW12!=. & wave5 == 1 | GB17_snpW12 == GB17_greenW12 & GB17_snpW12!=. & wave5 == 1 | GB17_snpW12 == GB17_pcW12 & GB17_snpW12!=. & wave5 == 1

replace GB17_ambiguous_districtW12 = 99 if GB17_pcW12 == GB17_conW12 & GB17_pcW12!=. & wave5 == 1 | GB17_pcW12 == GB17_labW12 & GB17_pcW12!=. & wave5 == 1 | GB17_pcW12 == GB17_ldW12 & GB17_pcW12!=. & wave5 == 1 | GB17_pcW12 == GB17_ukipW12 & GB17_pcW12!=. & wave5 == 1 | GB17_pcW12 == GB17_greenW12 & GB17_pcW12!=. & wave5 == 1 | GB17_pcW12 == GB17_snpW12 & GB17_pcW12!=. & wave5 == 1

gen GB17_ambW12 = 1 if GB17_ambiguous_districtW12 == 99 & GB17_completeW12 == 1

* Generate value of 0 for lower expectations

replace GB17_conW12 = 0 if GB17_conW12!=1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_labW12 = 0 if GB17_labW12!=1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_ldW12 = 0 if GB17_ldW12!=1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_ukipW12 = 0 if GB17_ukipW12!=1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_greenW12 = 0 if GB17_greenW12!=1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_snpW12 = 0 if GB17_snpW12!=1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_pcW12 = 0 if GB17_pcW12!=1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_othW12 = 0 if GB17_othW12!=1 & GB17_completeW12 == 1 & wave5 == 1

* Forecasts (1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = Scottish National Party, 5 = Plaid Cymru, 6 = United Kingdom Independence Party, 7 = Green Party, 8 = British National Party, 9 = other party, 11 = Change UK – The Independent Group, 12 = Brexit Party, 99 = ambiguous)

gen GB17_forecast_districtW12 = .

replace GB17_forecast_districtW12 = 1 if GB17_conW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 2 if GB17_labW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 3 if GB17_ldW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 6 if GB17_ukipW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 7 if GB17_greenW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 4 if GB17_snpW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 5 if GB17_pcW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 9 if GB17_othW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_forecast_districtW12 = 99 if GB17_ambiguous_districtW12 == 99 & GB17_completeW12 == 1 & wave5 == 1

* Identify correct and ambiguous forecasts

gen GB17_correct_districtW12 = 0 if GB17_forecast_districtW12!=GB17_outcomeW12 & GB17_forecast_districtW12!=99 & GB17_outcomeW12!=. & GB17_completeW12== 1 & wave5 == 1
replace GB17_correct_districtW12 = 1 if GB17_forecast_districtW12 == GB17_outcomeW12 & GB17_forecast_districtW12!=99 & GB17_outcomeW12!=. & GB17_completeW12== 1 & wave5 == 1

replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_conW12!=1 & GB17_outcomeW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_labW12!=1 & GB17_outcomeW12 == 2 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_ldW12!=1 & GB17_outcomeW12 == 3 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_ukipW12!=1 & GB17_outcomeW12 == 6 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_greenW12!=1 & GB17_outcomeW12 == 7 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_snpW12!=1 & GB17_outcomeW12 == 4 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_pcW12!=1 & GB17_outcomeW12 == 5 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 0 if GB17_forecast_districtW12 == 99 & GB17_othW12!=1 & GB17_outcomeW12 == 9 & GB17_completeW12 == 1 & wave5 == 1

replace GB17_correct_districtW12 = 0 if winConstituencyConW12 == 9999 & winConstituencyLabW12 == 9999 & winConstituencyLDW12 == 9999 & winConstituencyUKIPW12 == 9999 & winConstituencyGreenW12 == 9999 & countryW12 == 1 & wave5 == 1

replace GB17_correct_districtW12 = 0 if winConstituencyConW12 == 9999 & winConstituencyLabW12 == 9999 & winConstituencyLDW12 == 9999 & winConstituencyUKIPW12 == 9999 & winConstituencyGreenW12 == 9999 & winConstituencySNPW12 == 9999 & countryW12 == 2 & wave5 == 1

replace GB17_correct_districtW12 = 0 if winConstituencyConW12 == 9999 & winConstituencyLabW12 == 9999 & winConstituencyLDW12 == 9999 & winConstituencyUKIPW12 == 9999 & winConstituencyGreenW12 == 9999 & winConstituencyPCW12 == 9999 & countryW12 == 3 & wave5 == 1

replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_conW12 == 1 & GB17_outcomeW12 == 1 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_labW12 == 1 & GB17_outcomeW12 == 2 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_ldW12 == 1 & GB17_outcomeW12 == 3 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_ukipW12 == 1 & GB17_outcomeW12 == 6 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_greenW12 == 1 & GB17_outcomeW12 == 7 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_snpW12 == 1 & GB17_outcomeW12 == 4 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_pcW12 == 1 & GB17_outcomeW12 == 5 & GB17_completeW12 == 1 & wave5 == 1
replace GB17_correct_districtW12 = 99 if GB17_forecast_districtW12 == 99 & GB17_othW12 == 1 & GB17_outcomeW12 == 9 & GB17_completeW12 == 1 & wave5 == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen GB17_correct_districtW12_d = GB17_correct_districtW12

replace GB17_correct_districtW12_d = 0 if GB17_correct_districtW12_d == 99
replace GB17_correct_districtW12_d = 1 if GB17_correct_districtW12_d == 1


******************************************************************
** DISTRICT-LEVEL EXPECTATIONS: 2019 GENERAL ELECTION (WAVE 17) **
******************************************************************

* Generate variable identifying incomplete answers (Plaid Cymru in Wales only, SNP in Scotland only)

gen GB19_con_chanceW17 = winConstituencyConW17
gen GB19_lab_chanceW17 = winConstituencyLabW17
gen GB19_ld_chanceW17 = winConstituencyLDW17
gen GB19_ukip_chanceW17 = winConstituencyUKIPW17 
gen GB19_ind_chanceW17 = winConstituencyIndW17
gen GB19_brexit_chanceW17 = winConstituencyBrexitW17
gen GB19_green_chanceW17 = winConstituencyGreenW17
gen GB19_snp_chanceW17 = winConstituencySNPW17
gen GB19_pc_chanceW17 = winConstituencyPCW17

recode GB19_con_chanceW17 GB19_lab_chanceW17 GB19_ld_chanceW17 GB19_ukip_chanceW17 GB19_ind_chanceW17 GB19_brexit_chanceW17 GB19_green_chanceW17 GB19_snp_chanceW17 GB19_pc_chanceW17 (9999=.)

gen GB19_complete_englandW17 = 1 if GB19_con_chanceW17!=. & GB19_lab_chanceW17!=. & GB19_ld_chanceW17!=. & GB19_ukip_chanceW17!=. & GB19_green_chanceW17!=. & GB19_ind_chanceW17!=. & GB19_brexit_chanceW17!=. & wave17 == 1 & countryW17 == 1

gen GB19_complete_scotlandW17 = 1 if GB19_con_chanceW17!=. & GB19_lab_chanceW17!=. & GB19_ld_chanceW17!=. & GB19_ukip_chanceW17!=. & GB19_green_chanceW17!=. & GB19_snp_chanceW17!=. & GB19_ind_chanceW17!=. & GB19_brexit_chanceW17!=. & wave17 == 1 & countryW17 == 2

gen GB19_complete_walesW17 = 1 if GB19_con_chanceW17!=. & GB19_lab_chanceW17!=. & GB19_ld_chanceW17!=. & GB19_ukip_chanceW17!=. & GB19_green_chanceW17!=. & GB19_pc_chanceW17!=. & GB19_ind_chanceW17!=. & GB19_brexit_chanceW17!=. & wave17 == 1 & countryW17 == 3

gen GB19_completeW17 = max(GB19_complete_englandW17,GB19_complete_walesW17,GB19_complete_scotlandW17)

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (England)

gen GB19_con_englandW17 = 1 if GB19_con_chanceW17 >= GB19_lab_chanceW17 & GB19_con_chanceW17 >= GB19_ld_chanceW17 & GB19_con_chanceW17 >= GB19_ukip_chanceW17 & GB19_con_chanceW17 >= GB19_green_chanceW17 & GB19_con_chanceW17 >= GB19_ind_chanceW17 & GB19_con_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

gen GB19_lab_englandW17 = 1 if GB19_lab_chanceW17 >= GB19_con_chanceW17 & GB19_lab_chanceW17 >= GB19_ld_chanceW17 & GB19_lab_chanceW17 >= GB19_ukip_chanceW17 & GB19_lab_chanceW17 >= GB19_green_chanceW17 & GB19_lab_chanceW17 >= GB19_ind_chanceW17 & GB19_lab_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

gen GB19_ld_englandW17 = 1 if GB19_ld_chanceW17 >= GB19_con_chanceW17 & GB19_ld_chanceW17 >= GB19_lab_chanceW17 & GB19_ld_chanceW17 >= GB19_ukip_chanceW17 & GB19_ld_chanceW17 >= GB19_green_chanceW17 & GB19_ld_chanceW17 >= GB19_ind_chanceW17 & GB19_ld_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

gen GB19_ukip_englandW17 = 1 if GB19_ukip_chanceW17 >= GB19_con_chanceW17 & GB19_ukip_chanceW17 >= GB19_lab_chanceW17 & GB19_ukip_chanceW17 >= GB19_ld_chanceW17 & GB19_ukip_chanceW17 >= GB19_green_chanceW17 & GB19_ukip_chanceW17 >= GB19_ind_chanceW17 & GB19_ukip_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

gen GB19_green_englandW17 = 1 if GB19_green_chanceW17 >= GB19_con_chanceW17 & GB19_green_chanceW17 >= GB19_lab_chanceW17 & GB19_green_chanceW17 >= GB19_ld_chanceW17 & GB19_green_chanceW17 >= GB19_ukip_chanceW17 & GB19_green_chanceW17 >= GB19_ind_chanceW17 & GB19_green_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

gen GB19_ind_englandW17 = 1 if GB19_ind_chanceW17 >= GB19_con_chanceW17 & GB19_ind_chanceW17 >= GB19_lab_chanceW17 & GB19_ind_chanceW17 >= GB19_ld_chanceW17 & GB19_ind_chanceW17 >= GB19_ukip_chanceW17 & GB19_ind_chanceW17 >= GB19_green_chanceW17 & GB19_ind_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

gen GB19_brexit_englandW17 = 1 if GB19_brexit_chanceW17 >= GB19_con_chanceW17 & GB19_brexit_chanceW17 >= GB19_lab_chanceW17 & GB19_brexit_chanceW17 >= GB19_ld_chanceW17 & GB19_brexit_chanceW17 >= GB19_ukip_chanceW17 & GB19_brexit_chanceW17 >= GB19_green_chanceW17 & GB19_brexit_chanceW17 >= GB19_ind_chanceW17 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

gen GB19_oth_englandW17 = 1 if GB19_con_chanceW17 == 0 & GB19_lab_chanceW17 == 0 & GB19_ld_chanceW17 == 0 & GB19_ukip_chanceW17 == 0 & GB19_green_chanceW17 == 0 & GB19_ind_chanceW17 == 0 & GB19_brexit_chanceW17 == 0 & countryW17 == 1 & GB19_complete_englandW17 == 1 & wave17 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Scotland)

gen GB19_con_scotlandW17 = 1 if GB19_con_chanceW17 >= GB19_lab_chanceW17 & GB19_con_chanceW17 >= GB19_ld_chanceW17 & GB19_con_chanceW17 >= GB19_ukip_chanceW17 & GB19_con_chanceW17 >= GB19_green_chanceW17 & GB19_con_chanceW17 >= GB19_snp_chanceW17 & GB19_con_chanceW17 >= GB19_ind_chanceW17 & GB19_con_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_lab_scotlandW17 = 1 if GB19_lab_chanceW17 >= GB19_con_chanceW17 & GB19_lab_chanceW17 >= GB19_ld_chanceW17 & GB19_lab_chanceW17 >= GB19_ukip_chanceW17 & GB19_lab_chanceW17 >= GB19_green_chanceW17 & GB19_lab_chanceW17 >= GB19_snp_chanceW17 & GB19_lab_chanceW17 >= GB19_ind_chanceW17 & GB19_lab_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_ld_scotlandW17 = 1 if GB19_ld_chanceW17 >= GB19_con_chanceW17 & GB19_ld_chanceW17 >= GB19_lab_chanceW17 & GB19_ld_chanceW17 >= GB19_ukip_chanceW17 & GB19_ld_chanceW17 >= GB19_green_chanceW17 & GB19_ld_chanceW17 >= GB19_snp_chanceW17 & GB19_ld_chanceW17 >= GB19_ind_chanceW17 & GB19_ld_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_ukip_scotlandW17 = 1 if GB19_ukip_chanceW17 >= GB19_con_chanceW17 & GB19_ukip_chanceW17 >= GB19_lab_chanceW17 & GB19_ukip_chanceW17 >= GB19_ld_chanceW17 & GB19_ukip_chanceW17 >= GB19_green_chanceW17 & GB19_ukip_chanceW17 >= GB19_snp_chanceW17 & GB19_ukip_chanceW17 >= GB19_ind_chanceW17 & GB19_ukip_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_green_scotlandW17 = 1 if GB19_green_chanceW17 >= GB19_con_chanceW17 & GB19_green_chanceW17 >= GB19_lab_chanceW17 & GB19_green_chanceW17 >= GB19_ld_chanceW17 & GB19_green_chanceW17 >= GB19_ukip_chanceW17 & GB19_green_chanceW17 >= GB19_snp_chanceW17 & GB19_green_chanceW17 >= GB19_ind_chanceW17 & GB19_green_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_snp_scotlandW17 = 1 if GB19_snp_chanceW17 >= GB19_con_chanceW17 & GB19_snp_chanceW17 >= GB19_lab_chanceW17 & GB19_snp_chanceW17 >= GB19_ld_chanceW17 & GB19_snp_chanceW17 >= GB19_ukip_chanceW17 & GB19_snp_chanceW17 >= GB19_green_chanceW17 & GB19_snp_chanceW17 >= GB19_ind_chanceW17 & GB19_snp_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_ind_scotlandW17 = 1 if GB19_ind_chanceW17 >= GB19_con_chanceW17 & GB19_ind_chanceW17 >= GB19_lab_chanceW17 & GB19_ind_chanceW17 >= GB19_ld_chanceW17 & GB19_ind_chanceW17 >= GB19_ukip_chanceW17 & GB19_ind_chanceW17 >= GB19_green_chanceW17 & GB19_ind_chanceW17 >= GB19_snp_chanceW17 & GB19_ind_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_brexitW17_scotland = 1 if GB19_brexit_chanceW17 >= GB19_con_chanceW17 & GB19_brexit_chanceW17 >= GB19_lab_chanceW17 & GB19_brexit_chanceW17 >= GB19_ld_chanceW17 & GB19_brexit_chanceW17 >= GB19_ukip_chanceW17 & GB19_brexit_chanceW17 >= GB19_green_chanceW17 & GB19_brexit_chanceW17 >= GB19_snp_chanceW17 & GB19_brexit_chanceW17 >= GB19_ind_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_oth_scotlandW17 = 1 if GB19_con_chanceW17 == 0 & GB19_lab_chanceW17 == 0 & GB19_ld_chanceW17 == 0 & GB19_ukip_chanceW17 == 0 & GB19_green_chanceW17 == 0 & GB19_snp_chanceW17 == 0 & GB19_ind_chanceW17 == 0 & GB19_brexit_chanceW17 == 0 & countryW17 == 2 & GB19_complete_scotlandW17== 1 & wave17 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Wales)

gen GB19_con_walesW17 = 1 if GB19_con_chanceW17 >= GB19_lab_chanceW17 & GB19_con_chanceW17 >= GB19_ld_chanceW17 & GB19_con_chanceW17 >= GB19_ukip_chanceW17 & GB19_con_chanceW17 >= GB19_green_chanceW17 & GB19_con_chanceW17 >= GB19_pc_chanceW17 & GB19_con_chanceW17 >= GB19_ind_chanceW17 & GB19_con_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_lab_walesW17 = 1 if GB19_lab_chanceW17 >= GB19_con_chanceW17 & GB19_lab_chanceW17 >= GB19_ld_chanceW17 & GB19_lab_chanceW17 >= GB19_ukip_chanceW17 & GB19_lab_chanceW17 >= GB19_green_chanceW17 & GB19_lab_chanceW17 >= GB19_pc_chanceW17 & GB19_lab_chanceW17 >= GB19_ind_chanceW17 & GB19_lab_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_ld_walesW17 = 1 if GB19_ld_chanceW17 >= GB19_con_chanceW17 & GB19_ld_chanceW17 >= GB19_lab_chanceW17 & GB19_ld_chanceW17 >= GB19_ukip_chanceW17 & GB19_ld_chanceW17 >= GB19_green_chanceW17 & GB19_ld_chanceW17 >= GB19_pc_chanceW17 & GB19_ld_chanceW17 >= GB19_ind_chanceW17 & GB19_ld_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_ukip_walesW17 = 1 if GB19_ukip_chanceW17 >= GB19_con_chanceW17 & GB19_ukip_chanceW17 >= GB19_lab_chanceW17 & GB19_ukip_chanceW17 >= GB19_ld_chanceW17 & GB19_ukip_chanceW17 >= GB19_green_chanceW17 & GB19_ukip_chanceW17 >= GB19_pc_chanceW17 & GB19_ukip_chanceW17 >= GB19_ind_chanceW17 & GB19_ukip_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_green_walesW17 = 1 if GB19_green_chanceW17 >= GB19_con_chanceW17 & GB19_green_chanceW17 >= GB19_lab_chanceW17 & GB19_green_chanceW17 >= GB19_ld_chanceW17 & GB19_green_chanceW17 >= GB19_ukip_chanceW17 & GB19_green_chanceW17 >= GB19_pc_chanceW17 & GB19_green_chanceW17 >= GB19_ind_chanceW17 & GB19_green_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_pc_walesW17 = 1 if GB19_pc_chanceW17 >= GB19_con_chanceW17 & GB19_pc_chanceW17 >= GB19_lab_chanceW17 & GB19_pc_chanceW17 >= GB19_ld_chanceW17 & GB19_pc_chanceW17 >= GB19_ukip_chanceW17 & GB19_pc_chanceW17 >= GB19_green_chanceW17 & GB19_pc_chanceW17 >= GB19_ind_chanceW17 & GB19_pc_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_ind_walesW17 = 1 if GB19_ind_chanceW17 >= GB19_con_chanceW17 & GB19_ind_chanceW17 >= GB19_lab_chanceW17 & GB19_ind_chanceW17 >= GB19_ld_chanceW17 & GB19_ind_chanceW17 >= GB19_ukip_chanceW17 & GB19_ind_chanceW17 >= GB19_green_chanceW17 & GB19_ind_chanceW17 >= GB19_pc_chanceW17 & GB19_ind_chanceW17 >= GB19_brexit_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_brexit_walesW17 = 1 if GB19_brexit_chanceW17 >= GB19_con_chanceW17 & GB19_brexit_chanceW17 >= GB19_lab_chanceW17 & GB19_brexit_chanceW17 >= GB19_ld_chanceW17 & GB19_brexit_chanceW17 >= GB19_ukip_chanceW17 & GB19_brexit_chanceW17 >= GB19_green_chanceW17 & GB19_brexit_chanceW17 >= GB19_pc_chanceW17 & GB19_brexit_chanceW17 >= GB19_ind_chanceW17 & countryW17 == 1 & GB19_complete_scotlandW17 == 1 & wave17 == 1

gen GB19_oth_walesW17 = 1 if GB19_con_chanceW17 == 0 & GB19_lab_chanceW17 == 0 & GB19_ld_chanceW17 == 0 & GB19_ukip_chanceW17 == 0 & GB19_green_chanceW17 == 0 & GB19_pc_chanceW17 == 0 & GB19_ind_chanceW17 == 0 & GB19_brexit_chanceW17 == 0 & countryW17 == 3 & GB19_complete_walesW17== 1 & wave17 == 1

* Combine

gen GB19_conW17 = max(GB19_con_englandW17,GB19_con_scotlandW17,GB19_con_walesW17) if GB19_completeW17 == 1 & wave17 == 1
gen GB19_labW17 = max(GB19_lab_englandW17,GB19_lab_scotlandW17,GB19_lab_walesW17) if GB19_completeW17 == 1 & wave17 == 1
gen GB19_ldW17 = max(GB19_ld_englandW17,GB19_ld_scotlandW17,GB19_ld_walesW17) if GB19_completeW17 == 1 & wave17 == 1
gen GB19_ukipW17 = max(GB19_ukip_englandW17,GB19_ukip_scotlandW17,GB19_ukip_walesW17) if GB19_completeW17 == 1 & wave17 == 1
gen GB19_greenW17 = max(GB19_green_englandW17,GB19_green_scotlandW17,GB19_green_walesW17) if GB19_completeW17 == 1 & wave17 == 1
gen GB19_indW17 = max(GB19_ind_englandW17,GB19_ind_scotlandW17,GB19_ind_walesW17) if GB19_completeW17 == 1 & wave17 == 1
gen GB19_brexitW17 = max(GB19_brexit_englandW17,GB19_brexitW17_scotland,GB19_brexit_walesW17) if GB19_completeW17 == 1 & wave17 == 1
gen GB19_snpW17 = GB19_snp_scotlandW17 if GB19_completeW17 == 1 & wave17 == 1
gen GB19_pcW17 = GB19_pc_walesW17 if GB19_completeW17 == 1 & wave17 == 1
gen GB19_othW17 = max(GB19_oth_englandW17,GB19_oth_scotlandW17,GB19_oth_walesW17) if GB19_completeW17 == 1 & wave17 == 1

replace GB19_conW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_labW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_ldW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_ukipW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_greenW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_indW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_brexitW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_snpW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_pcW17 = . if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1

* Generate variable for ambiguous forecasts

gen GB19_ambiguous_districtW17 = .

replace GB19_ambiguous_districtW17 = 99 if GB19_conW17 == GB19_labW17 & GB19_conW17!=. & wave17 == 1 | GB19_conW17 == GB19_ldW17 & GB19_conW17!=. & wave17 == 1 | GB19_conW17 == GB19_ukipW17 & GB19_conW17!=. & wave17 == 1 | GB19_conW17 == GB19_greenW17 & GB19_conW17!=. & wave17 == 1 | GB19_conW17 == GB19_snpW17 & GB19_conW17!=. & wave17 == 1 | GB19_conW17 == GB19_pcW17 & GB19_conW17!=. & wave17 == 1 | GB19_conW17 == GB19_indW17 & GB19_conW17!=. & wave17 == 1 | GB19_conW17 == GB19_brexitW17 & GB19_conW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_labW17 == GB19_conW17 & GB19_labW17!=. & wave17 == 1 | GB19_labW17 == GB19_ldW17 & GB19_labW17!=. & wave17 == 1 | GB19_labW17 == GB19_ukipW17 & GB19_labW17!=. & wave17 == 1 | GB19_labW17 == GB19_greenW17 & GB19_labW17!=. & wave17 == 1 | GB19_labW17 == GB19_snpW17 & GB19_labW17!=. & wave17 == 1 | GB19_labW17 == GB19_pcW17 & GB19_labW17!=. & wave17 == 1 | GB19_labW17 == GB19_indW17 & GB19_labW17!=. & wave17 == 1 | GB19_labW17 == GB19_brexitW17 & GB19_labW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_ldW17 == GB19_conW17 & GB19_ldW17!=. & wave17 == 1 | GB19_ldW17 == GB19_labW17 & GB19_ldW17!=. & wave17 == 1 | GB19_ldW17 == GB19_ukipW17 & GB19_ldW17!=. & wave17 == 1 | GB19_ldW17 == GB19_greenW17 & GB19_ldW17!=. & wave17 == 1 | GB19_ldW17 == GB19_snpW17 & GB19_ldW17!=. & wave17 == 1 | GB19_ldW17 == GB19_pcW17 & GB19_ldW17!=. & wave17 == 1 | GB19_ldW17 == GB19_indW17 & GB19_ldW17!=. & wave17 == 1 | GB19_ldW17 == GB19_brexitW17 & GB19_ldW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_ukipW17 == GB19_conW17 & GB19_ukipW17!=. & wave17 == 1 | GB19_ukipW17 == GB19_labW17 & GB19_ukipW17!=. & wave17 == 1 | GB19_ukipW17 == GB19_ldW17 & GB19_ukipW17!=. & wave17 == 1 | GB19_ukipW17 == GB19_greenW17 & GB19_ukipW17!=. & wave17 == 1 | GB19_ukipW17 == GB19_snpW17 & GB19_ukipW17!=. & wave17 == 1 | GB19_ukipW17 == GB19_pcW17 & GB19_ukipW17!=. & wave17 == 1 | GB19_ukipW17 == GB19_indW17 & GB19_ukipW17!=. & wave17 == 1 | GB19_ukipW17 == GB19_brexitW17 & GB19_ukipW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_greenW17 == GB19_conW17 & GB19_greenW17!=. & wave17 == 1 | GB19_greenW17 == GB19_labW17 & GB19_greenW17!=. & wave17 == 1 | GB19_greenW17 == GB19_ldW17 & GB19_greenW17!=. & wave17 == 1 | GB19_greenW17 == GB19_ukipW17 & GB19_greenW17!=. & wave17 == 1 | GB19_greenW17 == GB19_snpW17 & GB19_greenW17!=. & wave17 == 1 | GB19_greenW17 == GB19_pcW17 & GB19_greenW17!=. & wave17 == 1 | GB19_greenW17 == GB19_indW17 & GB19_greenW17!=. & wave17 == 1 | GB19_greenW17 == GB19_brexitW17 & GB19_greenW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_snpW17 == GB19_conW17 & GB19_snpW17!=. & wave17 == 1 | GB19_snpW17 == GB19_labW17 & GB19_snpW17!=. & wave17 == 1 | GB19_snpW17 == GB19_ldW17 & GB19_snpW17!=. & wave17 == 1 | GB19_snpW17 == GB19_ukipW17 & GB19_snpW17!=. & wave17 == 1 | GB19_snpW17 == GB19_greenW17 & GB19_snpW17!=. & wave17 == 1 | GB19_snpW17 == GB19_pcW17 & GB19_snpW17!=. & wave17 == 1 | GB19_snpW17 == GB19_indW17 & GB19_snpW17!=. & wave17 == 1 | GB19_snpW17 == GB19_brexitW17 & GB19_snpW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_pcW17 == GB19_conW17 & GB19_pcW17!=. & wave17 == 1 | GB19_pcW17 == GB19_labW17 & GB19_pcW17!=. & wave17 == 1 | GB19_pcW17 == GB19_ldW17 & GB19_pcW17!=. & wave17 == 1 | GB19_pcW17 == GB19_ukipW17 & GB19_pcW17!=. & wave17 == 1 | GB19_pcW17 == GB19_greenW17 & GB19_pcW17!=. & wave17 == 1 | GB19_pcW17 == GB19_snpW17 & GB19_pcW17!=. & wave17 == 1 | GB19_pcW17 == GB19_indW17 & GB19_pcW17!=. & wave17 == 1 | GB19_pcW17 == GB19_brexitW17 & GB19_pcW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_indW17 == GB19_conW17 & GB19_indW17!=. & wave17 == 1 | GB19_indW17 == GB19_labW17 & GB19_indW17!=. & wave17 == 1 | GB19_indW17 == GB19_ldW17 & GB19_indW17!=. & wave17 == 1 | GB19_indW17 == GB19_ukipW17 & GB19_indW17!=. & wave17 == 1 | GB19_indW17 == GB19_greenW17 & GB19_indW17!=. & wave17 == 1 | GB19_indW17 == GB19_snpW17 & GB19_indW17!=. & wave17 == 1 | GB19_indW17 == GB19_pcW17 & GB19_indW17!=. & wave17 == 1 | GB19_indW17 == GB19_brexitW17 & GB19_indW17!=. & wave17 == 1

replace GB19_ambiguous_districtW17 = 99 if GB19_brexitW17 == GB19_conW17 & GB19_brexitW17!=. & wave17 == 1 | GB19_brexitW17 == GB19_labW17 & GB19_brexitW17!=. & wave17 == 1 | GB19_brexitW17 == GB19_ldW17 & GB19_brexitW17!=. & wave17 == 1 | GB19_brexitW17 == GB19_ukipW17 & GB19_brexitW17!=. & wave17 == 1 | GB19_brexitW17 == GB19_greenW17 & GB19_brexitW17!=. & wave17 == 1 | GB19_brexitW17 == GB19_snpW17 & GB19_brexitW17!=. & wave17 == 1 | GB19_brexitW17 == GB19_pcW17 & GB19_brexitW17!=. & wave17 == 1 | GB19_brexitW17 == GB19_indW17 & GB19_brexitW17!=. & wave17 == 1

gen GB19_ambW17 = 1 if GB19_ambiguous_districtW17 == 99 & GB19_completeW17 == 1

* Generate value of 0 for lower expectations

replace GB19_conW17 = 0 if GB19_conW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_labW17 = 0 if GB19_labW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_ldW17 = 0 if GB19_ldW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_ukipW17 = 0 if GB19_ukipW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_greenW17 = 0 if GB19_greenW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_indW17 = 0 if GB19_indW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_brexitW17 = 0 if GB19_brexitW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_snpW17 = 0 if GB19_snpW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_pcW17 = 0 if GB19_pcW17!=1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_othW17 = 0 if GB19_othW17!=1 & GB19_completeW17 == 1 & wave17 == 1

* Forecasts (1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = SNP, 5 = Plaid Cymru, 6 = UKIP, 7 = Green Party, 8 = BNP, 9 = other party, 11 = Change UK – The Independent Group, 12 = Brexit Party, 13 = independent, 99 = ambiguous)

gen GB19_forecast_districtW17 = .

replace GB19_forecast_districtW17 = 1 if GB19_conW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 2 if GB19_labW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 3 if GB19_ldW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 6 if GB19_ukipW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 7 if GB19_greenW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 13 if GB19_indW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 12 if GB19_brexitW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 4 if GB19_snpW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 5 if GB19_pcW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 9 if GB19_othW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_forecast_districtW17 = 99 if GB19_ambiguous_districtW17 == 99 & GB19_completeW17 == 1 & wave17 == 1

* Identify correct and ambiguous forecasts

gen GB19_correct_districtW17 = 0 if GB19_forecast_districtW17!=GB19_outcomeW17 & GB19_outcomeW17!=. & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 1 if GB19_forecast_districtW17 == GB19_outcomeW17 & GB19_forecast_districtW17!=99 & GB19_outcomeW17!=. & GB19_completeW17 == 1 & wave17 == 1

replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_conW17!=1 & GB19_outcomeW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_labW17!=1 & GB19_outcomeW17 == 2 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_ldW17!=1 & GB19_outcomeW17 == 3 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_ukipW17!=1 & GB19_outcomeW17 == 6 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_greenW17!=1 & GB19_outcomeW17 == 7 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_indW17!=1 & GB19_outcomeW17 == 13 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_brexitW17!=1 & GB19_outcomeW17 == 12 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_snpW17!=1 & GB19_outcomeW17 == 4 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_pcW17!=1 & GB19_outcomeW17 == 5 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 0 if GB19_forecast_districtW17 == 99 & GB19_othW17!=1 & GB19_outcomeW17 == 9 & GB19_completeW17 == 1 & wave17 == 1

replace GB19_correct_districtW17 = 0 if winConstituencyConW17 == 9999 & winConstituencyLabW17 == 9999 & winConstituencyLDW17 == 9999 & winConstituencyIndW17 == 9999 & winConstituencyBrexitW17 == 9999 & winConstituencyUKIPW17 == 9999 & winConstituencyGreenW17 == 9999 & countryW17 == 1 & wave17 == 1

replace GB19_correct_districtW17 = 0 if winConstituencyConW17 == 9999 & winConstituencyLabW17 == 9999 & winConstituencyLDW17 == 9999 & winConstituencyIndW17 == 9999 & winConstituencyBrexitW17 == 9999 & winConstituencyUKIPW17 == 9999 & winConstituencyGreenW17 == 9999 & winConstituencySNPW17 == 9999 & countryW17 == 2 & wave17 == 1

replace GB19_correct_districtW17 = 0 if winConstituencyConW17 == 9999 & winConstituencyLabW17 == 9999 & winConstituencyLDW17 == 9999 & winConstituencyIndW17 == 9999 & winConstituencyBrexitW17 == 9999 & winConstituencyUKIPW17 == 9999 & winConstituencyGreenW17 == 9999 & winConstituencyPCW17 == 9999 & countryW17 == 3 & wave17 == 1

replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_conW17 == 1 & GB19_outcomeW17 == 1 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_labW17 == 1 & GB19_outcomeW17 == 2 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_ldW17 == 1 & GB19_outcomeW17 == 3 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_ukipW17 == 1 & GB19_outcomeW17 == 6 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_greenW17 == 1 & GB19_outcomeW17 == 7 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_indW17 == 1 & GB19_outcomeW17 == 13 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_brexitW17 == 1 & GB19_outcomeW17 == 12 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_snpW17 == 1 & GB19_outcomeW17 == 4 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_pcW17 == 1 & GB19_outcomeW17 == 5 & GB19_completeW17 == 1 & wave17 == 1
replace GB19_correct_districtW17 = 99 if GB19_forecast_districtW17 == 99 & GB19_othW17 == 1 & GB19_outcomeW17 == 9 & GB19_completeW17 == 1 & wave17 == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen GB19_correct_districtW17_d = GB19_correct_districtW17

replace GB19_correct_districtW17_d = 0 if GB19_correct_districtW17_d == 99
replace GB19_correct_districtW17_d = 1 if GB19_correct_districtW17_d == 1


******************************************************************
** DISTRICT-LEVEL EXPECTATIONS: 2019 GENERAL ELECTION (WAVE 18) **
******************************************************************

* Generate variable identifying incomplete answers (Plaid Cymru in Wales only, SNP in Scotland only)

gen GB19_con_chanceW18 = winConstituencyConW18
gen GB19_lab_chanceW18 = winConstituencyLabW18
gen GB19_ld_chanceW18 = winConstituencyLDW18
gen GB19_ukip_chanceW18 = winConstituencyUKIPW18 
gen GB19_ind_chanceW18 = winConstituencyIndW18
gen GB19_brexit_chanceW18 = winConstituencyBrexitW18
gen GB19_green_chanceW18 = winConstituencyGreenW18
gen GB19_snp_chanceW18 = winConstituencySNPW18
gen GB19_pc_chanceW18 = winConstituencyPCW18

recode GB19_con_chanceW18 GB19_lab_chanceW18 GB19_ld_chanceW18 GB19_ukip_chanceW18 GB19_ind_chanceW18 GB19_brexit_chanceW18 GB19_green_chanceW18 GB19_snp_chanceW18 GB19_pc_chanceW18 (9999=.)

gen GB19_complete_englandW18 = 1 if GB19_con_chanceW18!=. & GB19_lab_chanceW18!=. & GB19_ld_chanceW18!=. & GB19_ukip_chanceW18!=. & GB19_green_chanceW18!=. & GB19_ind_chanceW18!=. & GB19_brexit_chanceW18!=. & wave17 == 1 & countryW18 == 1

gen GB19_complete_scotlandW18 = 1 if GB19_con_chanceW18!=. & GB19_lab_chanceW18!=. & GB19_ld_chanceW18!=. & GB19_ukip_chanceW18!=. & GB19_green_chanceW18!=. & GB19_snp_chanceW18!=. & GB19_ind_chanceW18!=. & GB19_brexit_chanceW18!=. & wave17 == 1 & countryW18 == 2

gen GB19_complete_walesW18 = 1 if GB19_con_chanceW18!=. & GB19_lab_chanceW18!=. & GB19_ld_chanceW18!=. & GB19_ukip_chanceW18!=. & GB19_green_chanceW18!=. & GB19_pc_chanceW18!=. & GB19_ind_chanceW18!=. & GB19_brexit_chanceW18!=. & wave17 == 1 & countryW18 == 3

gen GB19_completeW18 = max(GB19_complete_englandW18,GB19_complete_walesW18,GB19_complete_scotlandW18)

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (England)

gen GB19_con_englandW18 = 1 if GB19_con_chanceW18 >= GB19_lab_chanceW18 & GB19_con_chanceW18 >= GB19_ld_chanceW18 & GB19_con_chanceW18 >= GB19_ukip_chanceW18 & GB19_con_chanceW18 >= GB19_green_chanceW18 & GB19_con_chanceW18 >= GB19_ind_chanceW18 & GB19_con_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

gen GB19_lab_englandW18 = 1 if GB19_lab_chanceW18 >= GB19_con_chanceW18 & GB19_lab_chanceW18 >= GB19_ld_chanceW18 & GB19_lab_chanceW18 >= GB19_ukip_chanceW18 & GB19_lab_chanceW18 >= GB19_green_chanceW18 & GB19_lab_chanceW18 >= GB19_ind_chanceW18 & GB19_lab_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

gen GB19_ld_englandW18 = 1 if GB19_ld_chanceW18 >= GB19_con_chanceW18 & GB19_ld_chanceW18 >= GB19_lab_chanceW18 & GB19_ld_chanceW18 >= GB19_ukip_chanceW18 & GB19_ld_chanceW18 >= GB19_green_chanceW18 & GB19_ld_chanceW18 >= GB19_ind_chanceW18 & GB19_ld_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

gen GB19_ukip_englandW18 = 1 if GB19_ukip_chanceW18 >= GB19_con_chanceW18 & GB19_ukip_chanceW18 >= GB19_lab_chanceW18 & GB19_ukip_chanceW18 >= GB19_ld_chanceW18 & GB19_ukip_chanceW18 >= GB19_green_chanceW18 & GB19_ukip_chanceW18 >= GB19_ind_chanceW18 & GB19_ukip_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

gen GB19_green_englandW18 = 1 if GB19_green_chanceW18 >= GB19_con_chanceW18 & GB19_green_chanceW18 >= GB19_lab_chanceW18 & GB19_green_chanceW18 >= GB19_ld_chanceW18 & GB19_green_chanceW18 >= GB19_ukip_chanceW18 & GB19_green_chanceW18 >= GB19_ind_chanceW18 & GB19_green_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

gen GB19_ind_englandW18 = 1 if GB19_ind_chanceW18 >= GB19_con_chanceW18 & GB19_ind_chanceW18 >= GB19_lab_chanceW18 & GB19_ind_chanceW18 >= GB19_ld_chanceW18 & GB19_ind_chanceW18 >= GB19_ukip_chanceW18 & GB19_ind_chanceW18 >= GB19_green_chanceW18 & GB19_ind_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

gen GB19_brexit_englandW18 = 1 if GB19_brexit_chanceW18 >= GB19_con_chanceW18 & GB19_brexit_chanceW18 >= GB19_lab_chanceW18 & GB19_brexit_chanceW18 >= GB19_ld_chanceW18 & GB19_brexit_chanceW18 >= GB19_ukip_chanceW18 & GB19_brexit_chanceW18 >= GB19_green_chanceW18 & GB19_brexit_chanceW18 >= GB19_ind_chanceW18 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

gen GB19_oth_englandW18 = 1 if GB19_con_chanceW18 == 0 & GB19_lab_chanceW18 == 0 & GB19_ld_chanceW18 == 0 & GB19_ukip_chanceW18 == 0 & GB19_green_chanceW18 == 0 & GB19_ind_chanceW18 == 0 & GB19_brexit_chanceW18 == 0 & countryW18 == 1 & GB19_complete_englandW18 == 1 & wave17 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Scotland)

gen GB19_con_scotlandW18 = 1 if GB19_con_chanceW18 >= GB19_lab_chanceW18 & GB19_con_chanceW18 >= GB19_ld_chanceW18 & GB19_con_chanceW18 >= GB19_ukip_chanceW18 & GB19_con_chanceW18 >= GB19_green_chanceW18 & GB19_con_chanceW18 >= GB19_snp_chanceW18 & GB19_con_chanceW18 >= GB19_ind_chanceW18 & GB19_con_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_lab_scotlandW18 = 1 if GB19_lab_chanceW18 >= GB19_con_chanceW18 & GB19_lab_chanceW18 >= GB19_ld_chanceW18 & GB19_lab_chanceW18 >= GB19_ukip_chanceW18 & GB19_lab_chanceW18 >= GB19_green_chanceW18 & GB19_lab_chanceW18 >= GB19_snp_chanceW18 & GB19_lab_chanceW18 >= GB19_ind_chanceW18 & GB19_lab_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_ld_scotlandW18 = 1 if GB19_ld_chanceW18 >= GB19_con_chanceW18 & GB19_ld_chanceW18 >= GB19_lab_chanceW18 & GB19_ld_chanceW18 >= GB19_ukip_chanceW18 & GB19_ld_chanceW18 >= GB19_green_chanceW18 & GB19_ld_chanceW18 >= GB19_snp_chanceW18 & GB19_ld_chanceW18 >= GB19_ind_chanceW18 & GB19_ld_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_ukip_scotlandW18 = 1 if GB19_ukip_chanceW18 >= GB19_con_chanceW18 & GB19_ukip_chanceW18 >= GB19_lab_chanceW18 & GB19_ukip_chanceW18 >= GB19_ld_chanceW18 & GB19_ukip_chanceW18 >= GB19_green_chanceW18 & GB19_ukip_chanceW18 >= GB19_snp_chanceW18 & GB19_ukip_chanceW18 >= GB19_ind_chanceW18 & GB19_ukip_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_green_scotlandW18 = 1 if GB19_green_chanceW18 >= GB19_con_chanceW18 & GB19_green_chanceW18 >= GB19_lab_chanceW18 & GB19_green_chanceW18 >= GB19_ld_chanceW18 & GB19_green_chanceW18 >= GB19_ukip_chanceW18 & GB19_green_chanceW18 >= GB19_snp_chanceW18 & GB19_green_chanceW18 >= GB19_ind_chanceW18 & GB19_green_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_snp_scotlandW18 = 1 if GB19_snp_chanceW18 >= GB19_con_chanceW18 & GB19_snp_chanceW18 >= GB19_lab_chanceW18 & GB19_snp_chanceW18 >= GB19_ld_chanceW18 & GB19_snp_chanceW18 >= GB19_ukip_chanceW18 & GB19_snp_chanceW18 >= GB19_green_chanceW18 & GB19_snp_chanceW18 >= GB19_ind_chanceW18 & GB19_snp_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_ind_scotlandW18 = 1 if GB19_ind_chanceW18 >= GB19_con_chanceW18 & GB19_ind_chanceW18 >= GB19_lab_chanceW18 & GB19_ind_chanceW18 >= GB19_ld_chanceW18 & GB19_ind_chanceW18 >= GB19_ukip_chanceW18 & GB19_ind_chanceW18 >= GB19_green_chanceW18 & GB19_ind_chanceW18 >= GB19_snp_chanceW18 & GB19_ind_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_brexitW18_scotland = 1 if GB19_brexit_chanceW18 >= GB19_con_chanceW18 & GB19_brexit_chanceW18 >= GB19_lab_chanceW18 & GB19_brexit_chanceW18 >= GB19_ld_chanceW18 & GB19_brexit_chanceW18 >= GB19_ukip_chanceW18 & GB19_brexit_chanceW18 >= GB19_green_chanceW18 & GB19_brexit_chanceW18 >= GB19_snp_chanceW18 & GB19_brexit_chanceW18 >= GB19_ind_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_oth_scotlandW18 = 1 if GB19_con_chanceW18 == 0 & GB19_lab_chanceW18 == 0 & GB19_ld_chanceW18 == 0 & GB19_ukip_chanceW18 == 0 & GB19_green_chanceW18 == 0 & GB19_snp_chanceW18 == 0 & GB19_ind_chanceW18 == 0 & GB19_brexit_chanceW18 == 0 & countryW18 == 2 & GB19_complete_scotlandW18== 1 & wave17 == 1

* Generate value of 1 if the expectation for one candidate is higher or equal to the expectations for at least one other candidate (Wales)

gen GB19_con_walesW18 = 1 if GB19_con_chanceW18 >= GB19_lab_chanceW18 & GB19_con_chanceW18 >= GB19_ld_chanceW18 & GB19_con_chanceW18 >= GB19_ukip_chanceW18 & GB19_con_chanceW18 >= GB19_green_chanceW18 & GB19_con_chanceW18 >= GB19_pc_chanceW18 & GB19_con_chanceW18 >= GB19_ind_chanceW18 & GB19_con_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_lab_walesW18 = 1 if GB19_lab_chanceW18 >= GB19_con_chanceW18 & GB19_lab_chanceW18 >= GB19_ld_chanceW18 & GB19_lab_chanceW18 >= GB19_ukip_chanceW18 & GB19_lab_chanceW18 >= GB19_green_chanceW18 & GB19_lab_chanceW18 >= GB19_pc_chanceW18 & GB19_lab_chanceW18 >= GB19_ind_chanceW18 & GB19_lab_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_ld_walesW18 = 1 if GB19_ld_chanceW18 >= GB19_con_chanceW18 & GB19_ld_chanceW18 >= GB19_lab_chanceW18 & GB19_ld_chanceW18 >= GB19_ukip_chanceW18 & GB19_ld_chanceW18 >= GB19_green_chanceW18 & GB19_ld_chanceW18 >= GB19_pc_chanceW18 & GB19_ld_chanceW18 >= GB19_ind_chanceW18 & GB19_ld_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_ukip_walesW18 = 1 if GB19_ukip_chanceW18 >= GB19_con_chanceW18 & GB19_ukip_chanceW18 >= GB19_lab_chanceW18 & GB19_ukip_chanceW18 >= GB19_ld_chanceW18 & GB19_ukip_chanceW18 >= GB19_green_chanceW18 & GB19_ukip_chanceW18 >= GB19_pc_chanceW18 & GB19_ukip_chanceW18 >= GB19_ind_chanceW18 & GB19_ukip_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_green_walesW18 = 1 if GB19_green_chanceW18 >= GB19_con_chanceW18 & GB19_green_chanceW18 >= GB19_lab_chanceW18 & GB19_green_chanceW18 >= GB19_ld_chanceW18 & GB19_green_chanceW18 >= GB19_ukip_chanceW18 & GB19_green_chanceW18 >= GB19_pc_chanceW18 & GB19_green_chanceW18 >= GB19_ind_chanceW18 & GB19_green_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_pc_walesW18 = 1 if GB19_pc_chanceW18 >= GB19_con_chanceW18 & GB19_pc_chanceW18 >= GB19_lab_chanceW18 & GB19_pc_chanceW18 >= GB19_ld_chanceW18 & GB19_pc_chanceW18 >= GB19_ukip_chanceW18 & GB19_pc_chanceW18 >= GB19_green_chanceW18 & GB19_pc_chanceW18 >= GB19_ind_chanceW18 & GB19_pc_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_ind_walesW18 = 1 if GB19_ind_chanceW18 >= GB19_con_chanceW18 & GB19_ind_chanceW18 >= GB19_lab_chanceW18 & GB19_ind_chanceW18 >= GB19_ld_chanceW18 & GB19_ind_chanceW18 >= GB19_ukip_chanceW18 & GB19_ind_chanceW18 >= GB19_green_chanceW18 & GB19_ind_chanceW18 >= GB19_pc_chanceW18 & GB19_ind_chanceW18 >= GB19_brexit_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_brexit_walesW18 = 1 if GB19_brexit_chanceW18 >= GB19_con_chanceW18 & GB19_brexit_chanceW18 >= GB19_lab_chanceW18 & GB19_brexit_chanceW18 >= GB19_ld_chanceW18 & GB19_brexit_chanceW18 >= GB19_ukip_chanceW18 & GB19_brexit_chanceW18 >= GB19_green_chanceW18 & GB19_brexit_chanceW18 >= GB19_pc_chanceW18 & GB19_brexit_chanceW18 >= GB19_ind_chanceW18 & countryW18 == 1 & GB19_complete_scotlandW18 == 1 & wave17 == 1

gen GB19_oth_walesW18 = 1 if GB19_con_chanceW18 == 0 & GB19_lab_chanceW18 == 0 & GB19_ld_chanceW18 == 0 & GB19_ukip_chanceW18 == 0 & GB19_green_chanceW18 == 0 & GB19_pc_chanceW18 == 0 & GB19_ind_chanceW18 == 0 & GB19_brexit_chanceW18 == 0 & countryW18 == 3 & GB19_complete_walesW18== 1 & wave17 == 1

* Combine

gen GB19_conW18 = max(GB19_con_englandW18,GB19_con_scotlandW18,GB19_con_walesW18) if GB19_completeW18 == 1 & wave17 == 1
gen GB19_labW18 = max(GB19_lab_englandW18,GB19_lab_scotlandW18,GB19_lab_walesW18) if GB19_completeW18 == 1 & wave17 == 1
gen GB19_ldW18 = max(GB19_ld_englandW18,GB19_ld_scotlandW18,GB19_ld_walesW18) if GB19_completeW18 == 1 & wave17 == 1
gen GB19_ukipW18 = max(GB19_ukip_englandW18,GB19_ukip_scotlandW18,GB19_ukip_walesW18) if GB19_completeW18 == 1 & wave17 == 1
gen GB19_greenW18 = max(GB19_green_englandW18,GB19_green_scotlandW18,GB19_green_walesW18) if GB19_completeW18 == 1 & wave17 == 1
gen GB19_indW18 = max(GB19_ind_englandW18,GB19_ind_scotlandW18,GB19_ind_walesW18) if GB19_completeW18 == 1 & wave17 == 1
gen GB19_brexitW18 = max(GB19_brexit_englandW18,GB19_brexitW18_scotland,GB19_brexit_walesW18) if GB19_completeW18 == 1 & wave17 == 1
gen GB19_snpW18 = GB19_snp_scotlandW18 if GB19_completeW18 == 1 & wave17 == 1
gen GB19_pcW18 = GB19_pc_walesW18 if GB19_completeW18 == 1 & wave17 == 1
gen GB19_othW18 = max(GB19_oth_englandW18,GB19_oth_scotlandW18,GB19_oth_walesW18) if GB19_completeW18 == 1 & wave17 == 1

replace GB19_conW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_labW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_ldW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_ukipW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_greenW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_indW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_brexitW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_snpW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_pcW18 = . if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1

* Generate variable for ambiguous forecasts

gen GB19_ambiguous_districtW18 = .

replace GB19_ambiguous_districtW18 = 99 if GB19_conW18 == GB19_labW18 & GB19_conW18!=. & wave17 == 1 | GB19_conW18 == GB19_ldW18 & GB19_conW18!=. & wave17 == 1 | GB19_conW18 == GB19_ukipW18 & GB19_conW18!=. & wave17 == 1 | GB19_conW18 == GB19_greenW18 & GB19_conW18!=. & wave17 == 1 | GB19_conW18 == GB19_snpW18 & GB19_conW18!=. & wave17 == 1 | GB19_conW18 == GB19_pcW18 & GB19_conW18!=. & wave17 == 1 | GB19_conW18 == GB19_indW18 & GB19_conW18!=. & wave17 == 1 | GB19_conW18 == GB19_brexitW18 & GB19_conW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_labW18 == GB19_conW18 & GB19_labW18!=. & wave17 == 1 | GB19_labW18 == GB19_ldW18 & GB19_labW18!=. & wave17 == 1 | GB19_labW18 == GB19_ukipW18 & GB19_labW18!=. & wave17 == 1 | GB19_labW18 == GB19_greenW18 & GB19_labW18!=. & wave17 == 1 | GB19_labW18 == GB19_snpW18 & GB19_labW18!=. & wave17 == 1 | GB19_labW18 == GB19_pcW18 & GB19_labW18!=. & wave17 == 1 | GB19_labW18 == GB19_indW18 & GB19_labW18!=. & wave17 == 1 | GB19_labW18 == GB19_brexitW18 & GB19_labW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_ldW18 == GB19_conW18 & GB19_ldW18!=. & wave17 == 1 | GB19_ldW18 == GB19_labW18 & GB19_ldW18!=. & wave17 == 1 | GB19_ldW18 == GB19_ukipW18 & GB19_ldW18!=. & wave17 == 1 | GB19_ldW18 == GB19_greenW18 & GB19_ldW18!=. & wave17 == 1 | GB19_ldW18 == GB19_snpW18 & GB19_ldW18!=. & wave17 == 1 | GB19_ldW18 == GB19_pcW18 & GB19_ldW18!=. & wave17 == 1 | GB19_ldW18 == GB19_indW18 & GB19_ldW18!=. & wave17 == 1 | GB19_ldW18 == GB19_brexitW18 & GB19_ldW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_ukipW18 == GB19_conW18 & GB19_ukipW18!=. & wave17 == 1 | GB19_ukipW18 == GB19_labW18 & GB19_ukipW18!=. & wave17 == 1 | GB19_ukipW18 == GB19_ldW18 & GB19_ukipW18!=. & wave17 == 1 | GB19_ukipW18 == GB19_greenW18 & GB19_ukipW18!=. & wave17 == 1 | GB19_ukipW18 == GB19_snpW18 & GB19_ukipW18!=. & wave17 == 1 | GB19_ukipW18 == GB19_pcW18 & GB19_ukipW18!=. & wave17 == 1 | GB19_ukipW18 == GB19_indW18 & GB19_ukipW18!=. & wave17 == 1 | GB19_ukipW18 == GB19_brexitW18 & GB19_ukipW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_greenW18 == GB19_conW18 & GB19_greenW18!=. & wave17 == 1 | GB19_greenW18 == GB19_labW18 & GB19_greenW18!=. & wave17 == 1 | GB19_greenW18 == GB19_ldW18 & GB19_greenW18!=. & wave17 == 1 | GB19_greenW18 == GB19_ukipW18 & GB19_greenW18!=. & wave17 == 1 | GB19_greenW18 == GB19_snpW18 & GB19_greenW18!=. & wave17 == 1 | GB19_greenW18 == GB19_pcW18 & GB19_greenW18!=. & wave17 == 1 | GB19_greenW18 == GB19_indW18 & GB19_greenW18!=. & wave17 == 1 | GB19_greenW18 == GB19_brexitW18 & GB19_greenW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_snpW18 == GB19_conW18 & GB19_snpW18!=. & wave17 == 1 | GB19_snpW18 == GB19_labW18 & GB19_snpW18!=. & wave17 == 1 | GB19_snpW18 == GB19_ldW18 & GB19_snpW18!=. & wave17 == 1 | GB19_snpW18 == GB19_ukipW18 & GB19_snpW18!=. & wave17 == 1 | GB19_snpW18 == GB19_greenW18 & GB19_snpW18!=. & wave17 == 1 | GB19_snpW18 == GB19_pcW18 & GB19_snpW18!=. & wave17 == 1 | GB19_snpW18 == GB19_indW18 & GB19_snpW18!=. & wave17 == 1 | GB19_snpW18 == GB19_brexitW18 & GB19_snpW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_pcW18 == GB19_conW18 & GB19_pcW18!=. & wave17 == 1 | GB19_pcW18 == GB19_labW18 & GB19_pcW18!=. & wave17 == 1 | GB19_pcW18 == GB19_ldW18 & GB19_pcW18!=. & wave17 == 1 | GB19_pcW18 == GB19_ukipW18 & GB19_pcW18!=. & wave17 == 1 | GB19_pcW18 == GB19_greenW18 & GB19_pcW18!=. & wave17 == 1 | GB19_pcW18 == GB19_snpW18 & GB19_pcW18!=. & wave17 == 1 | GB19_pcW18 == GB19_indW18 & GB19_pcW18!=. & wave17 == 1 | GB19_pcW18 == GB19_brexitW18 & GB19_pcW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_indW18 == GB19_conW18 & GB19_indW18!=. & wave17 == 1 | GB19_indW18 == GB19_labW18 & GB19_indW18!=. & wave17 == 1 | GB19_indW18 == GB19_ldW18 & GB19_indW18!=. & wave17 == 1 | GB19_indW18 == GB19_ukipW18 & GB19_indW18!=. & wave17 == 1 | GB19_indW18 == GB19_greenW18 & GB19_indW18!=. & wave17 == 1 | GB19_indW18 == GB19_snpW18 & GB19_indW18!=. & wave17 == 1 | GB19_indW18 == GB19_pcW18 & GB19_indW18!=. & wave17 == 1 | GB19_indW18 == GB19_brexitW18 & GB19_indW18!=. & wave17 == 1

replace GB19_ambiguous_districtW18 = 99 if GB19_brexitW18 == GB19_conW18 & GB19_brexitW18!=. & wave17 == 1 | GB19_brexitW18 == GB19_labW18 & GB19_brexitW18!=. & wave17 == 1 | GB19_brexitW18 == GB19_ldW18 & GB19_brexitW18!=. & wave17 == 1 | GB19_brexitW18 == GB19_ukipW18 & GB19_brexitW18!=. & wave17 == 1 | GB19_brexitW18 == GB19_greenW18 & GB19_brexitW18!=. & wave17 == 1 | GB19_brexitW18 == GB19_snpW18 & GB19_brexitW18!=. & wave17 == 1 | GB19_brexitW18 == GB19_pcW18 & GB19_brexitW18!=. & wave17 == 1 | GB19_brexitW18 == GB19_indW18 & GB19_brexitW18!=. & wave17 == 1

gen GB19_ambW18 = 1 if GB19_ambiguous_districtW18 == 99 & GB19_completeW18 == 1

* Generate value of 0 for lower expectations

replace GB19_conW18 = 0 if GB19_conW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_labW18 = 0 if GB19_labW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_ldW18 = 0 if GB19_ldW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_ukipW18 = 0 if GB19_ukipW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_greenW18 = 0 if GB19_greenW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_indW18 = 0 if GB19_indW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_brexitW18 = 0 if GB19_brexitW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_snpW18 = 0 if GB19_snpW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_pcW18 = 0 if GB19_pcW18!=1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_othW18 = 0 if GB19_othW18!=1 & GB19_completeW18 == 1 & wave17 == 1

* Forecasts (1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = SNP, 5 = Plaid Cymru, 6 = UKIP, 7 = Green Party, 8 = BNP, 9 = other party, 11 = Change UK – The Independent Group, 12 = Brexit Party, 13 = independent, 99 = ambiguous)

gen GB19_forecast_districtW18 = .

replace GB19_forecast_districtW18 = 1 if GB19_conW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 2 if GB19_labW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 3 if GB19_ldW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 6 if GB19_ukipW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 7 if GB19_greenW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 13 if GB19_indW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 12 if GB19_brexitW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 4 if GB19_snpW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 5 if GB19_pcW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 9 if GB19_othW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_forecast_districtW18 = 99 if GB19_ambiguous_districtW18 == 99 & GB19_completeW18 == 1 & wave17 == 1

* Identify correct and ambiguous forecasts

gen GB19_correct_districtW18 = 0 if GB19_forecast_districtW18!=GB19_outcomeW18 & GB19_outcomeW18!=. & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 1 if GB19_forecast_districtW18 == GB19_outcomeW18 & GB19_forecast_districtW18!=99 & GB19_outcomeW18!=. & GB19_completeW18 == 1 & wave17 == 1

replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_conW18!=1 & GB19_outcomeW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_labW18!=1 & GB19_outcomeW18 == 2 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_ldW18!=1 & GB19_outcomeW18 == 3 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_ukipW18!=1 & GB19_outcomeW18 == 6 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_greenW18!=1 & GB19_outcomeW18 == 7 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_indW18!=1 & GB19_outcomeW18 == 13 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_brexitW18!=1 & GB19_outcomeW18 == 12 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_snpW18!=1 & GB19_outcomeW18 == 4 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_pcW18!=1 & GB19_outcomeW18 == 5 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 0 if GB19_forecast_districtW18 == 99 & GB19_othW18!=1 & GB19_outcomeW18 == 9 & GB19_completeW18 == 1 & wave17 == 1

replace GB19_correct_districtW18 = 0 if winConstituencyConW18 == 9999 & winConstituencyLabW18 == 9999 & winConstituencyLDW18 == 9999 & winConstituencyIndW18 == 9999 & winConstituencyBrexitW18 == 9999 & winConstituencyUKIPW18 == 9999 & winConstituencyGreenW18 == 9999 & countryW18 == 1 & wave17 == 1

replace GB19_correct_districtW18 = 0 if winConstituencyConW18 == 9999 & winConstituencyLabW18 == 9999 & winConstituencyLDW18 == 9999 & winConstituencyIndW18 == 9999 & winConstituencyBrexitW18 == 9999 & winConstituencyUKIPW18 == 9999 & winConstituencyGreenW18 == 9999 & winConstituencySNPW18 == 9999 & countryW18 == 2 & wave17 == 1

replace GB19_correct_districtW18 = 0 if winConstituencyConW18 == 9999 & winConstituencyLabW18 == 9999 & winConstituencyLDW18 == 9999 & winConstituencyIndW18 == 9999 & winConstituencyBrexitW18 == 9999 & winConstituencyUKIPW18 == 9999 & winConstituencyGreenW18 == 9999 & winConstituencyPCW18 == 9999 & countryW18 == 3 & wave17 == 1

replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_conW18 == 1 & GB19_outcomeW18 == 1 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_labW18 == 1 & GB19_outcomeW18 == 2 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_ldW18 == 1 & GB19_outcomeW18 == 3 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_ukipW18 == 1 & GB19_outcomeW18 == 6 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_greenW18 == 1 & GB19_outcomeW18 == 7 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_indW18 == 1 & GB19_outcomeW18 == 13 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_brexitW18 == 1 & GB19_outcomeW18 == 12 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_snpW18 == 1 & GB19_outcomeW18 == 4 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_pcW18 == 1 & GB19_outcomeW18 == 5 & GB19_completeW18 == 1 & wave17 == 1
replace GB19_correct_districtW18 = 99 if GB19_forecast_districtW18 == 99 & GB19_othW18 == 1 & GB19_outcomeW18 == 9 & GB19_completeW18 == 1 & wave17 == 1

* Generate dichotomous variable (treat ambiguous forecasts as incorrect)

gen GB19_correct_districtW18_d = GB19_correct_districtW18

replace GB19_correct_districtW18_d = 0 if GB19_correct_districtW18_d == 99
replace GB19_correct_districtW18_d = 1 if GB19_correct_districtW18_d == 1


***********************************
** MERGE DATA FROM WAVES 4 AND 5 **
***********************************

gen GB15_correct_districtW4W5_d = GB15_correct_districtW5_d
replace GB15_correct_districtW4W5_d = GB15_correct_districtW4_d if GB15_correct_districtW5_d == .

gen GB15_discussionW4W5 = GB15_discussionW5
replace GB15_discussionW4W5 = GB15_discussionW4 if GB15_discussionW5 == .

gen GB15_discussionW4W5_3pts = GB15_discussionW5_3pts
replace GB15_discussionW4W5_3pts = GB15_discussionW4_3pts if GB15_discussionW5_3pts == .

gen GB15_pidscale_districtW4W5 = GB15_pidscale_districtW5
replace GB15_pidscale_districtW4W5 = GB15_pidscale_districtW4 if GB15_pidscale_districtW5 == .

gen GB15_interestW4W5 = GB15_interestW5
replace GB15_interestW4W5 = GB15_interestW4 if GB15_interestW5 == .

gen GB15_newsW4W5 = GB15_newsW5
replace GB15_newsW4W5 = GB15_newsW4 if GB15_newsW5 == .

gen GB15_ageW4W5 = GB15_ageW5
replace GB15_ageW4W5 = GB15_ageW4 if GB15_ageW5 == .

gen GB15_educationW4W5 = GB15_educationW5
replace GB15_educationW4W5 = GB15_educationW4 if GB15_educationW5 == .

gen GB15_timeW4W5 = GB15_timeW5
replace GB15_timeW4W5 = GB15_timeW4 if GB15_timeW5 == .

gen GB15_enepW4W5 = GB15_enepW5
replace GB15_enepW4W5 = GB15_enepW4 if GB15_enepW5 == .

gen GB15_marginW4W5 = GB15_marginW5
replace GB15_marginW4W5 = GB15_marginW4 if GB15_marginW5 == .

gen GB15_reelectedW4W5 = GB15_reelectedW5
replace GB15_reelectedW4W5 = GB15_reelectedW4 if GB15_reelectedW5 == .

gen districtW4W5 = districtW5
replace districtW4W5 = districtW4 if districtW5 == .

gen wave4_5 = wave5
replace wave4_5 = wave4 if wave5 == .


*************************************
** MERGE DATA FROM WAVES 11 AND 12 **
*************************************

gen GB17_correct_districtW11W12_d = GB17_correct_districtW12_d
replace GB17_correct_districtW11W12_d = GB17_correct_districtW11_d if GB17_correct_districtW12_d == .

gen GB17_discussionW11W12 = GB17_discussionW12
replace GB17_discussionW11W12 = GB17_discussionW11 if GB17_discussionW12 == .

gen GB17_discussionW11W12_3pts = GB17_discussionW12_3pts
replace GB17_discussionW11W12_3pts = GB17_discussionW11_3pts if GB17_discussionW12_3pts == .

gen GB17_disagreementW11W12 = GB17_disagreementW12
replace GB17_disagreementW11W12 = GB17_disagreementW11 if GB17_disagreementW12 == .

gen GB17_disagreementW11W12_3pts = GB17_disagreementW12_3pts
replace GB17_disagreementW11W12_3pts = GB17_disagreementW11_3pts if GB17_disagreementW12_3pts == .

gen GB17_pidscale_districtW11W12 = GB17_pidscale_districtW12
replace GB17_pidscale_districtW11W12 = GB17_pidscale_districtW11 if GB17_pidscale_districtW12 == .

gen GB17_interestW11W12 = GB17_interestW12
replace GB17_interestW11W12 = GB17_interestW11 if GB17_interestW12 == .

gen GB17_newsW11W12 = GB17_newsW12
replace GB17_newsW11W12 = GB17_newsW11 if GB17_newsW12 == .

gen GB17_ageW11W12 = GB17_ageW12
replace GB17_ageW11W12 = GB17_ageW11 if GB17_ageW12 == .

gen GB17_educationW11W12 = GB17_educationW12
replace GB17_educationW11W12 = GB17_educationW11 if GB17_educationW12 == .

gen GB17_timeW11W12 = GB17_timeW12
replace GB17_timeW11W12 = GB17_timeW11 if GB17_timeW12 == .

gen GB17_enepW11W12 = GB17_enepW12
replace GB17_enepW11W12 = GB17_enepW11 if GB17_enepW12 == .

gen GB17_marginW11W12 = GB17_marginW12
replace GB17_marginW11W12 = GB17_marginW11 if GB17_marginW12 == .

gen GB17_reelectedW11W12 = GB17_reelectedW12
replace GB17_reelectedW11W12 = GB17_reelectedW11 if GB17_reelectedW12 == .

gen districtW11W12 = districtW12
replace districtW11W12 = districtW11 if districtW12 == .

gen wave11_12 = wave12
replace wave11_12 = wave11 if wave12 == .


*************************************
** MERGE DATA FROM WAVES 17 AND 18 **
*************************************

gen GB19_correct_districtW17W18_d = GB19_correct_districtW18_d
replace GB19_correct_districtW17W18_d = GB19_correct_districtW17_d if GB19_correct_districtW18_d == .

gen GB19_discussionW17W18 = GB19_discussionW18
replace GB19_discussionW17W18 = GB19_discussionW17 if GB19_discussionW18 == .

gen GB19_discussionW17W18_3pts = GB19_discussionW18_3pts
replace GB19_discussionW17W18_3pts = GB19_discussionW17_3pts if GB19_discussionW18_3pts == .

gen GB19_disagreementW17W18 = GB19_disagreementW18
replace GB19_disagreementW17W18 = GB19_disagreementW17 if GB19_disagreementW18 == .

gen GB19_disagreementW17W18_3pts = GB19_disagreementW18_3pts
replace GB19_disagreementW17W18_3pts = GB19_disagreementW17_3pts if GB19_disagreementW18_3pts == .

gen GB19_pidscale_districtW17W18 = GB19_pidscale_districtW18
replace GB19_pidscale_districtW17W18 = GB19_pidscale_districtW17 if GB19_pidscale_districtW18 == .

gen GB19_interestW17W18 = GB19_interestW18
replace GB19_interestW17W18 = GB19_interestW17 if GB19_interestW18 == .

gen GB19_newsW17W18 = GB19_newsW18
replace GB19_newsW17W18 = GB19_newsW17 if GB19_newsW18 == .

gen GB19_ageW17W18 = GB19_ageW18
replace GB19_ageW17W18 = GB19_ageW17 if GB19_ageW18 == .

gen GB19_educationW17W18 = GB19_educationW18
replace GB19_educationW17W18 = GB19_educationW17 if GB19_educationW18 == .

gen GB19_timeW17W18 = GB19_timeW18
replace GB19_timeW17W18 = GB19_timeW17 if GB19_timeW18 == .

gen GB19_enepW17W18 = GB19_enepW18
replace GB19_enepW17W18 = GB19_enepW17 if GB19_enepW18 == .

gen GB19_marginW17W18 = GB19_marginW18
replace GB19_marginW17W18 = GB19_marginW17 if GB19_marginW18 == .

gen GB19_reelectedW17W18 = GB19_reelectedW18
replace GB19_reelectedW17W18 = GB19_reelectedW17 if GB19_reelectedW18 == .

gen districtW17W18 = districtW18
replace districtW17W18 = districtW17 if districtW18 == .

gen wave17_18 = wave18
replace wave17_18 = wave17 if wave18 == .


**********
** SAVE **
**********

save "gb2015_2019_bes.dta", replace


***************************************************
** MAIN ANALYSES: 2015 GENERAL ELECTION (WAVE 4) **
***************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB15_correct_districtW4_d GB15_discussionW4 GB15_pidscale_districtW4 GB15_interestW4 GB15_newsW4 i.male GB15_ageW4 GB15_educationW4 GB15_timeW4 GB15_enepW4 i.GB15_reelectedW4 if wave4 == 1 || districtW4: , or
estimates table, star(.05 .01 .001)

tab GB15_correct_districtW4_d if e(sample) == 1


********************************************************
** SUMMARY STATISTICS: 2015 GENERAL ELECTION (WAVE 4) **
********************************************************

label variable GB15_correct_districtW4_d "District winner (DV)"
label variable GB15_discussionW4 "Discussion"
label variable GB15_pidscale_districtW4 "District PID"
label variable GB15_interestW4 "Interest"
label variable GB15_newsW4 "News attentiveness"
label variable male "Gender (male = 1)"
label variable GB15_ageW4 "Age"
label variable GB15_educationW4 "Education"
label variable GB15_enepW4 "ENEP"
label variable GB15_marginW4 "Margin"
label variable GB15_reelectedW4 "Reelected"
label variable GB15_timeW4 "Time of interview"

estpost tabstat GB15_correct_districtW4_d GB15_discussionW4 GB15_pidscale_districtW4 GB15_interestW4 GB15_newsW4 male GB15_ageW4 GB15_educationW4 GB15_timeW4 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2015_bes_summary_district_w4.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2015 British general election (BES), district level") replace

eststo clear


***************************************************
** MAIN ANALYSES: 2015 GENERAL ELECTION (WAVE 5) **
***************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB15_correct_districtW5_d GB15_discussionW5 GB15_pidscale_districtW5 GB15_interestW5 GB15_newsW5 i.male GB15_ageW5 GB15_educationW5 GB15_timeW5 GB15_enepW5 i.GB15_reelectedW5 if wave5 == 1 || districtW5: , or
estimates table, star(.05 .01 .001)

tab GB15_correct_districtW5_d if e(sample) == 1


********************************************************
** SUMMARY STATISTICS: 2015 GENERAL ELECTION (WAVE 5) **
********************************************************

label variable GB15_correct_districtW5_d "District winner (DV)"
label variable GB15_discussionW5 "Discussion"
label variable GB15_pidscale_districtW5 "District PID"
label variable GB15_interestW5 "Interest"
label variable GB15_newsW5 "News attentiveness"
label variable male "Gender (male = 1)"
label variable GB15_ageW5 "Age"
label variable GB15_educationW5 "Education"
label variable GB15_enepW5 "ENEP"
label variable GB15_marginW5 "Margin"
label variable GB15_reelectedW5 "Reelected"
label variable GB15_timeW5 "Time of interview"

estpost tabstat GB15_correct_districtW5_d GB15_discussionW5 GB15_pidscale_districtW5 GB15_interestW5 GB15_newsW5 male GB15_ageW5 GB15_educationW5 GB15_timeW5 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2015_bes_summary_district_w5.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2015 British general election (BES), district level") replace

eststo clear


**********************************************************
** MAIN ANALYSES: 2015 GENERAL ELECTION (WAVES 4 AND 5) **
**********************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB15_correct_districtW4W5_d GB15_discussionW4W5 GB15_pidscale_districtW4W5 GB15_interestW4W5 GB15_newsW4W5 i.male GB15_ageW4W5 GB15_educationW4W5 GB15_timeW4W5 GB15_enepW4W5 i.GB15_reelectedW4W5 if wave4_5 == 1 || districtW4W5: , or
estimates table, star(.05 .01 .001)

tab GB15_correct_districtW4W5_d if e(sample) == 1


***************************************************************
** SUMMARY STATISTICS: 2015 GENERAL ELECTION (WAVES 4 AND 5) **
***************************************************************

label variable GB15_correct_districtW4W5_d "District winner (DV)"
label variable GB15_discussionW4W5 "Discussion"
label variable GB15_pidscale_districtW4W5 "District PID"
label variable GB15_interestW4W5 "Interest"
label variable GB15_newsW4W5 "News attentiveness"
label variable male "Gender (male = 1)"
label variable GB15_ageW4W5 "Age"
label variable GB15_educationW4W5 "Education"
label variable GB15_enepW4W5 "ENEP"
label variable GB15_marginW4W5 "Margin"
label variable GB15_reelectedW4W5 "Reelected"
label variable GB15_timeW4W5 "Time of interview"

estpost tabstat GB15_correct_districtW4W5_d GB15_discussionW4W5 GB15_pidscale_districtW4W5 GB15_interestW4W5 GB15_newsW4W5 male GB15_ageW4W5 GB15_educationW4W5 GB15_timeW4W5 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2015_bes_summary_district.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2015 British general election (BES), district level") replace

eststo clear


****************************************************
** MAIN ANALYSES: 2017 GENERAL ELECTION (WAVE 11) **
****************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB17_correct_districtW11_d GB17_discussionW11 GB17_disagreementW11 GB17_pidscale_districtW11 GB17_interestW11 GB17_knowledgeW11W12 i.male GB17_ageW11 GB17_educationW11 GB17_timeW11 GB17_enepW11 i.GB17_reelectedW11 if wave11 == 1 || districtW11: , or
estimates table, star(.05 .01 .001)

tab GB17_correct_districtW11_d if e(sample) == 1


*********************************************************
** SUMMARY STATISTICS: 2017 GENERAL ELECTION (WAVE 11) **
*********************************************************

label variable GB17_correct_districtW11_d "District winner (DV)"
label variable GB17_discussionW11 "Discussion"
label variable GB17_disagreementW11 "Disagreement"
label variable GB17_pidscale_districtW11 "District PID"
label variable GB17_interestW11 "Interest"
label variable GB17_knowledgeW11W12 "Political knowledge"
label variable male "Gender (male = 1)"
label variable GB17_ageW11 "Age"
label variable GB17_educationW11 "Education"
label variable GB17_enepW11 "ENEP"
label variable GB17_marginW11 "Margin"
label variable GB17_reelectedW11 "Reelected"
label variable GB17_timeW11 "Time of interview"

estpost tabstat GB17_correct_districtW11_d GB17_discussionW11 GB17_disagreementW11 GB17_pidscale_districtW11 GB17_interestW11 GB17_knowledgeW11W12 male GB17_ageW11 GB17_educationW11 GB17_timeW11 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2017_bes_summary_district_w11.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2017 British general election (BES), district level") replace

eststo clear


****************************************************
** MAIN ANALYSES: 2017 GENERAL ELECTION (WAVE 12) **
****************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB17_correct_districtW12_d GB17_discussionW12 GB17_disagreementW12 GB17_pidscale_districtW12 GB17_interestW12 GB17_newsW12 GB17_knowledgeW11W12 i.male GB17_ageW12 GB17_educationW12 GB17_timeW12 GB17_enepW12 i.GB17_reelectedW12 if wave12 == 1 || districtW12: , or
estimates table, star(.05 .01 .001)

tab GB17_correct_districtW12_d if e(sample) == 1


*********************************************************
** SUMMARY STATISTICS: 2017 GENERAL ELECTION (WAVE 12) **
*********************************************************

label variable GB17_correct_districtW12_d "District winner (DV)"
label variable GB17_discussionW12 "Discussion"
label variable GB17_disagreementW12 "Disagreement"
label variable GB17_pidscale_districtW12 "District PID"
label variable GB17_interestW12 "Interest"
label variable GB17_newsW12 "News attentiveness"
label variable GB17_knowledgeW11W12 "Political knowledge"
label variable male "Gender (male = 1)"
label variable GB17_ageW12 "Age"
label variable GB17_educationW12 "Education"
label variable GB17_enepW12 "ENEP"
label variable GB17_marginW12 "Margin"
label variable GB17_reelectedW12 "Reelected"
label variable GB17_timeW12 "Time of interview"

estpost tabstat GB17_correct_districtW12_d GB17_discussionW12 GB17_disagreementW12 GB17_pidscale_districtW12 GB17_interestW12 GB17_newsW12 GB17_knowledgeW11W12 male GB17_ageW12 GB17_educationW12 GB17_timeW12 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2017_bes_summary_district_w12.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2017 British general election (BES), district level") replace

eststo clear


************************************************************
** MAIN ANALYSES: 2017 GENERAL ELECTION (WAVES 11 AND 12) **
************************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB17_correct_districtW11W12_d GB17_discussionW11W12 GB17_disagreementW11W12 GB17_pidscale_districtW11W12 GB17_interestW11W12 GB17_newsW11W12 GB17_knowledgeW11W12 i.male GB17_ageW11W12 GB17_educationW11W12 GB17_timeW11W12 GB17_enepW11W12 i.GB17_reelectedW11W12 if wave11_12 == 1 || districtW11W12: , or
estimates table, star(.05 .01 .001)

tab GB17_correct_districtW11W12_d if e(sample) == 1


*****************************************************************
** SUMMARY STATISTICS: 2017 GENERAL ELECTION (WAVES 11 AND 12) **
*****************************************************************

label variable GB17_correct_districtW11W12_d "District winner (DV)"
label variable GB17_discussionW11W12 "Discussion"
label variable GB17_disagreementW11W12 "Disagreement"
label variable GB17_pidscale_districtW11W12 "District PID"
label variable GB17_interestW11W12 "Interest"
label variable GB17_newsW11W12 "News attentiveness"
label variable GB17_knowledgeW11W12 "Political knowledge"
label variable male "Gender (male = 1)"
label variable GB17_ageW11W12 "Age"
label variable GB17_educationW11W12 "Education"
label variable GB17_enepW11W12 "ENEP"
label variable GB17_marginW11W12 "Margin"
label variable GB17_reelectedW11W12 "Reelected"
label variable GB17_timeW11W12 "Time of interview"

estpost tabstat GB17_correct_districtW11W12_d GB17_discussionW11W12 GB17_disagreementW11W12 GB17_pidscale_districtW11W12 GB17_interestW11W12 GB17_newsW11W12 GB17_knowledgeW11W12 male GB17_ageW11W12 GB17_educationW11W12 GB17_timeW11W12 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2017_bes_summary_district.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2017 British general election (BES), district level") replace

eststo clear


****************************************************
** MAIN ANALYSES: 2019 GENERAL ELECTION (WAVE 17) **
****************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB19_correct_districtW17_d GB19_discussionW17 GB19_disagreementW17 GB19_pidscale_districtW17 GB19_interestW17 GB19_newsW17 GB19_knowledgeW17 i.male GB19_ageW17 GB19_educationW17 GB19_timeW17 GB19_enepW17 i.GB19_reelectedW17 if wave17 == 1 || districtW17: , or
estimates table, star(.05 .01 .001)

tab GB19_correct_districtW17_d if e(sample) == 1


*********************************************************
** SUMMARY STATISTICS: 2019 GENERAL ELECTION (WAVE 17) **
*********************************************************

label variable GB19_correct_districtW17_d "District winner (DV)"
label variable GB19_discussionW17 "Discussion"
label variable GB19_disagreementW17 "Disagreement"
label variable GB19_pidscale_districtW17 "District PID"
label variable GB19_interestW17 "Interest"
label variable GB19_newsW17 "News attentiveness"
label variable GB19_knowledgeW17 "Political knowledge"
label variable male "Gender (male = 1)"
label variable GB19_ageW17 "Age"
label variable GB19_educationW17 "Education"
label variable GB19_enepW17 "ENEP"
label variable GB19_marginW17 "Margin"
label variable GB19_reelectedW17 "Reelected"
label variable GB19_timeW17 "Time of interview"

estpost tabstat GB19_correct_districtW17_d GB19_discussionW17 GB19_disagreementW17 GB19_pidscale_districtW17 GB19_interestW17 GB19_newsW17 GB19_knowledgeW17 male GB19_ageW17 GB19_educationW17 GB19_timeW17 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2019_bes_summary_district_w17.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2019 British general election (BES), district level") replace

eststo clear


****************************************************
** MAIN ANALYSES: 2019 GENERAL ELECTION (WAVE 18) **
****************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB19_correct_districtW18_d GB19_discussionW18 GB19_disagreementW18 GB19_pidscale_districtW18 GB19_interestW18 GB19_newsW18 GB19_knowledgeW17 i.male GB19_ageW18 GB19_educationW18 GB19_timeW18 GB19_enepW18 i.GB19_reelectedW18 if wave18 == 1 || districtW18: , or
estimates table, star(.05 .01 .001)

tab GB19_correct_districtW18_d if e(sample) == 1


*********************************************************
** SUMMARY STATISTICS: 2019 GENERAL ELECTION (WAVE 18) **
*********************************************************

label variable GB19_correct_districtW18_d "District winner (DV)"
label variable GB19_discussionW18 "Discussion"
label variable GB19_disagreementW18 "Disagreement"
label variable GB19_pidscale_districtW18 "District PID"
label variable GB19_interestW18 "Interest"
label variable GB19_newsW18 "News attentiveness"
label variable GB19_knowledgeW17 "Political knowledge"
label variable male "Gender (male = 1)"
label variable GB19_ageW18 "Age"
label variable GB19_educationW18 "Education"
label variable GB19_enepW18 "ENEP"
label variable GB19_marginW18 "Margin"
label variable GB19_reelectedW18 "Reelected"
label variable GB19_timeW18 "Time of interview"

estpost tabstat GB19_correct_districtW18_d GB19_discussionW18 GB19_disagreementW18 GB19_pidscale_districtW18 GB19_interestW18 GB19_newsW18 GB19_knowledgeW17 male GB19_ageW18 GB19_educationW18 GB19_timeW18 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2019_bes_summary_district_w18.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2019 British general election (BES), district level") replace

eststo clear


************************************************************
** MAIN ANALYSES: 2019 GENERAL ELECTION (WAVES 17 AND 18) **
************************************************************

* Regression analysis and percentage of correct and incorrect forecasts

melogit GB19_correct_districtW17W18_d GB19_discussionW17W18 GB19_disagreementW17W18 GB19_pidscale_districtW17W18 GB19_interestW17W18 GB19_newsW17W18 i.male GB19_ageW17W18 GB19_educationW17W18 GB19_timeW17W18 GB19_enepW17W18 i.GB19_reelectedW17W18 if wave17_18 == 1 || districtW17W18: , or
estimates table, star(.05 .01 .001)

tab GB19_correct_districtW17W18_d if e(sample) == 1


*****************************************************************
** SUMMARY STATISTICS: 2019 GENERAL ELECTION (WAVES 17 AND 18) **
*****************************************************************

label variable GB19_correct_districtW17W18_d "District winner (DV)"
label variable GB19_discussionW17W18 "Discussion"
label variable GB19_disagreementW17W18 "Disagreement"
label variable GB19_pidscale_districtW17W18 "District PID"
label variable GB19_interestW17W18 "Interest"
label variable GB19_newsW17W18 "News attentiveness"
label variable male "Gender (male = 1)"
label variable GB19_ageW17W18 "Age"
label variable GB19_educationW17W18 "Education"
label variable GB19_enepW17W18 "ENEP"
label variable GB19_marginW17W18 "Margin"
label variable GB19_reelectedW17W18 "Reelected"
label variable GB19_timeW17W18 "Time of interview"

estpost tabstat GB19_correct_districtW17W18_d GB19_discussionW17W18 GB19_disagreementW17W18 GB19_pidscale_districtW17W18 GB19_interestW17W18 GB19_newsW17W18 male GB19_ageW17W18 GB19_educationW17W18 GB19_timeW17W18 if e(sample) == 1, statistics(n mean p50 sd min max) columns(statistics) 

esttab using "gb2019_bes_summary_district.tex", substitute("\begin{table}[htbp]" "\begin{table}[H]") cells("count(label(N) fmt(%9.0fc)) mean(fmt(%5.1f) label(Mean)) p50(fmt(%5.1f) label(Median)) sd(fmt(%5.1f) label(Std. dev.)) min(fmt(%5.1f) label(Min)) max(fmt(%5.1f) label(Max))") label width(\textwidth) nomtitle nonumber noobs booktabs title("Summary statistics -- 2019 British general election (BES), district level") replace

eststo clear

log close